How to Launch a Vbscript in Elevated Mode (Run as Administrator)

With the introduction of User Account Control (UAC) in Windows Vista, you usually open an elevated Command Prompt in order to run batch files and scripts that need administrative privileges. Applications can make use of manifest files (using the RequireAdministrator flag) to automatically run elevated.

For scripts, this article provides you some neat little tricks using which you can automatically elevate using the ShellExecute “runas” parameter.

(See also How to Automatically Elevate a Batch file to Run it as Administrator? for another auto-elevation method.)Read more