Windows Sudo

I have run into a minor annoyance when I am in the command line on Windows and need to elevate a command or program; so that I can do a administrative task. (A task like moving a file to the system32 folder), the normal solution is to right click command line short cut and “Run as Administrator”. While that works its not fast, I’m sure there are other solutions out there, but I wanted to quickly build on in .Net. I did this a while ago for Vista and called it elev, but never saved it and since I am trying to make the transition between Windows and Linux easier I called it sudo.

All you do is put this in your %windir%\system32\ folder, and then at the command line type “sudo cmd” or whatever command you want. Commands like “dir” are actually part of cmd not a separate file called so “sudo dir” wont show anything, it will output the .Net error.

I also wanted some commands at my finger tips, that made me add in a “/write” option, that adds ls, ifconfig, and a new superc command to the program.

Link to exe: https://github.com/daberkow/win_sudo/blob/master/sudo/sudo/bin/Release/sudo.exe

Link to project: https://github.com/daberkow/win_sudo

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s