Run a command as Administrator under Windows

To run any command under the credentials of a different user, *nix systems have the sudo command. For example:

$> sudo pico /etc/hostname

To run a program under the credentials of a different user under Windows, you can use the runas command.

runas /user:administrator notepad

i use this command to quickly create batch files which i can drop into my c:windowssystem32 folder for immediate path happiness

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>