What is the equivalent of sudo in Windows 7? [duplicate]

Possible Duplicate:
is there any 'Sudo' command for windows ?

Is there a command line equivalent to sudo in Windows 7? Or do you just have to open a command prompt that is being run as administrator?


The runas command is the equivelent of sudo in windows 7.

runas [{/profile|/noprofile}] [/env] [/netonly] [/smartcard] [/showtrustlevels] [/trustlevel] /user:UserAccountName program

Run the following command to start a command shell as an administrator. EDIT: Or you could right click the command prompt and click Run As Administrator.

runas /noprofile /user:Administrator cmd

Runas is a pretty functional equivalent.


It's easiest to run CMD as administrator (or elevated, in the case of standalone desktop Windows), but there is the runas command as well.


The failure IMO with runas is that when used, you are "running as" a different user. Different environment, different sets of defaults ...

A BIG TIME failure for me.

SuRun - SUDO in Windows states:

The best part is - SuRun will elevate the privileges for the CURRENT user account! It will not try to run programs as another, administrator account. This means all registry entries and file system paths will be correct, just as the user expects them!

(I have not tried it - yet. Cannot believe they way MS has implemented elevation & that I may have to resort to a third party program to have things work they way they should have in the first place.)