Last active
September 25, 2017 12:17
-
-
Save guiliredu/fa6bd230bcde5b3106cf7a022290d050 to your computer and use it in GitHub Desktop.
sudo.bat - simulate sudo command in windows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Save this file in C:\Windows or another folder in your $TEMP | |
@echo Set objShell = CreateObject("Shell.Application") > %temp%\sudo.tmp.vbs | |
@echo args = Right("%*", (Len("%*") - Len("%1"))) >> %temp%\sudo.tmp.vbs | |
@echo objShell.ShellExecute "%1", args, "", "runas" >> %temp%\sudo.tmp.vbs | |
@cscript %temp%\sudo.tmp.vbs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment