diff options
Diffstat (limited to 'xmake/scripts/sudo.vbs')
| -rw-r--r-- | xmake/scripts/sudo.vbs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xmake/scripts/sudo.vbs b/xmake/scripts/sudo.vbs new file mode 100644 index 000000000..9bc71637c --- /dev/null +++ b/xmake/scripts/sudo.vbs @@ -0,0 +1,15 @@ +Set UAC = CreateObject("Shell.Application") +Set Shell = CreateObject("WScript.Shell") +If WScript.Arguments.count < 1 Then + WScript.echo "Help: sudo <command> [args]" +ElseIf WScript.Arguments.count = 1 Then + UAC.ShellExecute WScript.arguments(0), "", "", "runas", 1 +Else + Dim ucCount + Dim args + args = NULL + For ucCount = 1 To (WScript.Arguments.count - 1) Step 1 + args = args & " " & WScript.Arguments(ucCount) + Next + UAC.ShellExecute WScript.arguments(0), args, "", "runas", 5 +End If |
