I am having trouble modifying Registry key values,
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.RegWrite "HKCU\MyNewKey\MyValue", "0"
WshShell.RegWrite "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA","0"
when i execute the code it always gave an error, ‘Invalid Root in Registry’
whats wrong with the code could somebody explain this ?
Try “HKEY_LOCAL_MACHINE” instead of HKLM. “HKEY_CURRENT_USER” instead of HKCU…