How to run a VBScript as Administrator on Windows 7
Posted on 2011-05-05
I need to change the Network Provider Order on Windows 7 Computers via a VBScript that is in our Novell Login Script but it fails as the VBScript executes with insufficient rights on Windows 7.
I've got the VBScript, it works perfectly on Windows XP Computers but when executing the script on Windows 7 (even with UAC set to it's lowest) it returns a VBScript error 80070005 which is "Access Denied" because the VBScript runs with insufficient rights.
The Windows 7 Computers are not currently on Active Directory, so a GPO is not an option, they are part of a workgroup. The Network O/S is currently Novell NetWare 6.5 so I will run the VBScript from the Novell Login Script.
Things I've come accross on GOOGLE but could not get it to work is to use a so-called "RunAsHighest fix" (not sure how to use it...), using the "runas" command in DOS (but this prompts the user for the password defeting the object)
I do have the local Administrator passwords of the PCs if this might help in any way...
How does one make a VBScript (first prize) or even a batch file to silently modify the registry (second prize) run on Windows 7 with sufficient rights and also without prompting the users with any messages (UAC is currntly set to it's lowest on all the Win 7 PCs).