Run VBScript as admin: Difference between revisions

no edit summary
m (1 revision imported)
No edit summary
 
In Windows Vista, 7, 8, 10 and 1011, you may want to run a '''VBScript as admin'''. While this is possible by right clicking and hitting "Administrator" most will probably want the UAC prompt to appear, like in a program. The below code will try to elevate privileges if it is on Vista and up (but will not if running on XP, 2000, etc.)
 
<syntaxhighlight lang="vbscript">