Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a windows 7 user who belongs to admin group. I want to execute sc command that requires admin privileges. I DON'T want to open an elevated cmd, want to be able to simply Win+R->Enter command, enter password and that's all. I tried the runas command, but it doesn't seem to work:

>runas /user:me "cmd"

and it asks for a password, and then the command is executed with normal privileges. I know I could use /user:administrator but I don't know the admin pass and I think the admin user (me) should work.

share|improve this question
add comment

migrated from stackoverflow.com Sep 6 '11 at 6:31

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 3 down vote accepted

Runas does not elevate commands due to UAC.

You can't run elevated commands in the run dialog either. You can download the "Elevation Powertoys" which allow you to elevate commands as elevate <i>command</i>

Or just use the start menu and press Ctrl + Shift + Enter.

share|improve this answer
    
But I can use /user:administrator, right? –  vangop Sep 9 '11 at 9:54
    
Depends. It is disabled by default. You would have to enable the Administrator account. –  surfasb Sep 9 '11 at 17:03
    
Today I learned about CTRL + SHIFT + ENTER. Thank you. –  shufler Oct 18 '12 at 20:00
add comment

Your Answer

 
discard

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.