Run VBScript as admin: Difference between revisions

no edit summary
computernewb>Judyhegao
m (fixed the ugly ass syntax highlighting)
 
No edit summary
 
(One intermediate revision by the same user not shown)
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">