In Linux, we can use sudo
to run command as root. In Windows, we can use runas
command to do that, but it doesn't support for empty password file! So we make this small macro for you to do the same thing as sudo for Windows.
Install this macro:
doskey sudo=start /min powershell -Command "Start-Process $* -Verb runAs"
Using this macro:
sudo
+ program name (in PATH)
When you use this macro, you will have a popup UAC prompt displayed.
- Powershell
You have to redefine this everytime you need this. If you want to automaticly define this, please refer to this StackOverFlow post.
- Auto save macro without redefine everytime need to use this.
Have fun with your
sudo
!