I would like to check whether the context in which my VBscript runs allows me to perform administrative tasks.
Requirements:
Here is the fastest way to cause a script file or any other file run as administrator:
First create your VBS script of whatever you need to do. In my case it was a registry edit vbs to allow me to autoadmin logon then when the machine was restarted, another file was run to ensure that autoadmin logon was not enabled any longer.
After you have created your file, then you need to create a cmd prompt shortcut. Next 'Right click' on the shortcut and change the propeties so that it will run as administrator.
Paste your file path like this: D:\WINDOWS\system32\cmd.exe /c "D:\Dump\Scripts\StartUp.vbs"
The 'C' means it will close after completion If you want it to stay open then use 'K'
Hope this helps someone else.