# DOS window with admin rights.



## bill.aam (Apr 29, 2004)

Ok, I know I can remote to a pc and goto the \windows\system32 folder and right click on cmd.exe and do the "run as" to open a DOS window with administrator rights. However what I need to know is can you open a DOS window with administratoir rights from a local pc using the <strat> ,run> ?


----------



## Jtoast (Oct 3, 2002)

Try typing cmd in the run line and then pressing ctrl-shift-enter. I use that method in Vista but have never tried it in XP.


----------



## bill.aam (Apr 29, 2004)

I know that does work. What I'm looking to do is open a dos window from a remote pc onto my desktop so I can run dos commands as administrator on the remote pc without actually using any remote software or application tools. I'm not sure how eles to explain it...


----------



## TheOutcaste (Aug 8, 2007)

Haven't tried this myself but have you tried the *RunAs* command?

```
C:\>RunAs /?
RUNAS USAGE:

RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]
        /user:<UserName> program

RUNAS [ [/noprofile | /profile] [/env] [/netonly] ]
        /smartcard [/user:<UserName>] program

   /noprofile        specifies that the user's profile should not be loaded.
                     This causes the application to load more quickly, but
                     can cause some applications to malfunction.
   /profile          specifies that the user's profile should be loaded.
                     This is the default.
   /env              to use current environment instead of user's.
   /netonly          use if the credentials specified are for remote
                     access only.
   /savecred         to use credentials previously saved by the user.
                     This option is not available on Windows XP Home Edition
                     and will be ignored.
   /smartcard        use if the credentials are to be supplied from a
                     smartcard.
   /user             <UserName> should be in form [email protected] or DOMAIN\USER
   program         command line for EXE.  See below for examples

Examples:
> runas /noprofile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"
> runas /env /user:[email protected] "notepad \"my file.txt\""

NOTE:  Enter user's password only when prompted.
NOTE:  [email protected] is not compatible with /netonly.
NOTE:  /profile is not compatible with /netonly.
```
HTH

Jerry


----------



## Squashman (Apr 4, 2003)

I am not quite sure where you are trying to launch a cmd prompt and from where. But this might help if you are trying to launch a cmd prompt on a remote machine as an administrator or any user that has rights on the remote machine.
http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx


----------

