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?


Use the runas command:

alt text

You can find more info in the Vista help.


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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