This is the faulty code
WshShell.RegDelete "HKEY_LOCAL_MACHINE\SOFTWARE\cFos\test\tvalue"
This is my error
Error: Unable to remove registry key “HKLM\SOFTWARE\test”.
Code: 800070005
Source: WshShell.RegDelete
I gather that I need to disable UAC in Win Vista/7/8 but I was wondering if there is a way to directly run the .vbs file as administrator. Because I need to distribute it and people might not like disabling their UAC and some might even think this is malicious if I give an explicit instruction to pull down their defense
Create a new shortcut file using below command line.
or…
You can then simply double click the shortcut file to execute the script using Administrator account.
The shortcut will prompt for Administrator password each time. If you want it to fully automate it, use below command line instead.
It will prompt for the password, but only once. The next time you run it, it will not prompt it again.