Sudo on Windows

sudo is the Linux system administrator's most used tool, I guess. It basically allows you to run any command as root (Administrator) so that you save tons of time and avoid tons of security issues.

The syntax of sudo is very simple:

sudo command arguments

As a long-time Linux and Windows user, I always missed sudo on Windows. One day I decided to search for a sudo command on Windows and found a few candidates. Only one worked as I wanted it to:

I have cached the unaltered zip archive from that page here in case the page ever goes down and you don't want to wait for to load.

Once you have downloaded the elevate-1.3.0-redist.7z archive and extracted the proper elevate.exe command from the appropriate bin.x86-* folder in the archive, you can define a DOSKEY alias as follows:

doskey sudo=elevate.exe -w $*

Once you've added elevate.exe to your PATH and loaded the alias, you can issue an administrator command like this (from a non-elevated console window):

sudo net share Music=E:\Music

The Windows elevation prompt then pops up, on your desktop, and you can confirm the operation. On Linux, this works quite a bit more fluent, but, alas, Windows is Windows and was never meant for serious use.

Final Note: I tried all the variants of elevate that I could find out there (three variants), but only the one listed above seems to do things correctly.