4

Possible Duplicate:
Is there any 'sudo' command for Windows?

I'm aware of the various options for setting the Run as administrator flag, and for opening an elevated console window. But what if I have a normal console window, and I want to run a command as an administrator? The runas program doesn't seem to have an option that says

Please don't show me some popup that I have to click on.

What I really want is something like sudo for Windows.

wasif
  • 9,176
Stabledog
  • 440

1 Answers1

1
runas /user:domain\administrator commandtorun

Type runas on its own to see the full syntax.

runas on TechNet

The popup is Windows' User Account Control (UAC) technology, and you can't bypass it because it increases security by requiring user confirmation. This is similar to sudo requiring a password. You can disable UAC, just as you can enable password-less sudo. It's true that UAC isn't quite as configurable as sudo however.

wasif
  • 9,176
Draemon
  • 778