How do you run a command as an administrator from the Windows command line?

jpaugh picture jpaugh · May 10, 2011 · Viewed 293.3k times · Source

I have a small script that performs the build and install process on Windows for a Bazaar repository I'm managing. I'm trying to run the script with elevated, administrative privileges from within the Windows shell (cmd.exe)--just as if I'd right-clicked it and chosen Run as Administrator, but without using any method that requires use of the graphical interface.

Answer

slashdottir picture slashdottir · Aug 19, 2013

Press the start button. In the search box type "cmd", then press Ctrl+Shift+Enter