Created
June 16, 2014 03:36
-
-
Save ebibibi/a198ff20bc42a03e789a to your computer and use it in GitHub Desktop.
run as administrator in vbscript
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
| do while WScript.Arguments.Count=0 and WScript.Version>=5.7 | |
| 'Run this script as admin. | |
| Set sha=CreateObject("Shell.Application") | |
| sha.ShellExecute "wscript.exe",""""+WScript.ScriptFullName+""" uac","","runas" | |
| WScript.Quit | |
| loop | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment