How do I run a command line program as Administrator under Windows 7?

124 views Asked by At

How do I run a command line program as Administrator under Windows 7? (Like sudo on Linux.)

I'm particularly interested in doing this, for a VS2010 command line program.

2

There are 2 answers

0
Greg On BEST ANSWER

The easiest way to do so is to right click cmd.exe, and select the option "Run as Administrator".

It's possible you may get a dialog box asking if you're sure, and if you are, select Ok. You now have admin access to the command line.

0
dovidzeev On

Type command in the search box in the start menu, right click command prompt and select run as administrator. Alternatively, start menu, type cmd, press ctrl+shift+enter.