Category: Uncategorized

Sudo for Windows Vista

Many programs in Windows Vista can run into the wrong side of User Account Protection. Normally, when these programs are run, you get the UAP dialog box, and the program is able to execute properly. But when you run programs from the command prompt, the UAP elevation mechanism is, for some reason, not used, and the program will not run.

Linux has a similar division of permissions, with regular users and root users. In Linux, there are two ways to run a program that requires root permissions: a root command shell, usually through su, or the one-shot program sudo, which runs a program as root. Windows comes with the first mechanism, an administrator command shell, built in, but provides no mechanism for running individual programs.

It is this problem that this program tries to fix. Named sudo, for its Linux counterpart, it invokes the mechanism used by Windows Explorer. To use it, just copy it into a folder in your PATH (I recommend %SystemRoot%\System32). Then, to run a command as administrator, just run sudo <command> [<arguments>].

Known bugs:

  • The UAP dialog will not pop over your window, like most prompts do. it will flash in your taskbar. Click the flashing icon to bring up the prompt and continue.
  • The program will run in a new window. It is impossible to pipe data between the programs, to allow use from the original command prompt. Future versions may have a “Press any key to continue” prompt, to allow reading the output of any console program.

TIP: Just like sudo su - on Linux, you can run sudo cmd to get an administrative command shell.

Download sudo.exe
Download source

WordPress Themes