windows runas command with elevated privileges, user in admin group

5,596

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:
5,596

Related videos on Youtube

vangop
Author by

vangop

Updated on September 18, 2022

Comments

  • vangop
    vangop over 1 year

    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.

  • vangop
    vangop over 12 years
    But I can use /user:administrator, right?
  • surfasb
    surfasb over 12 years
    Depends. It is disabled by default. You would have to enable the Administrator account.
  • ricastro
    ricastro over 11 years
    Today I learned about CTRL + SHIFT + ENTER. Thank you.
  • mwfearnley
    mwfearnley about 4 years
    Ctrl-Shift will also work when clicking Taskbar programs, to cause them to be run as Administrator.