Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What command can I use to confirm that I am running the command prompt elevated and what command can I use to force a program to run elevated from the command prompt?

share|improve this question

Use the runas command:

alt text

You can find more info in the Vista help.

share|improve this answer

to see whether the currently open command window has the priviledges you need, use whoami /groups This will show all the groups / tokens currently in use. Local admins would show up as NTAuthority\Administrators, which is probably what you are looking for. If your normal account is in this group anyway, you need to see if it is using this group "for deny only", in which case you are not elevated.

Personally, I created a new shortcut to CMD.exe, set the properties of the shortcut to run as Administrator (for which I use a different account at UAC), then change the properties of that window to have a different font and background colour (I use yellow text on blue background, your taste may be for lime on magenta, who knows?). I also increase the width and height of the screen, and make the buffer much bigger, as when I am doing admin type things I tend to want to go back further - some of those /? responses are pretty longwinded! Next time I use that shortcut, I do the UAC, then I have a window which looks very different from my non-elevated one.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.