Script execution error code 80070005 on Windows 2012

Recently found that some of the our maintenance VB script used for placing servers in Maintenance mode on SCOM were not working and were throwing errors as listed below:

Error: Invalid root in registry key
Code: 80070005
Source : WshShell.RegWrite

Well, found that the same script is working fine when executed as Run as Administrator. Validated the UAC and found that its already disabled on control panel.

Later its found that, disabling UAC will not help in executing the scripts and the UAC has to be disabled in registry by following below steps:

1. Open registry using “regedit”.
2. Browse to the following registry key:
3. Double-Click the EnableLUA Key on the right and Change the value data from 1 (UAC Enabled) to 0 (UAC Disabled).



Facebook Comments
Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *