Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Invalid root in registry key

$
0
0

Hello

I'm running a vbscript to modify a windows 7 registry.

The path i'm using exists and is correct, still i get an error "invalid root in registry key". The error refers to the Homeloc variable.

Any idea how to fix this?

The code:

Set WSHShell = CreateObject("WScript.Shell")

Homeloc = "HKEY_USERS\S-1-5-21-122345225-414423859-1584676111-19799\Software\Policies\Microsoft\Internet Explorer\Main\Start Page"

newhomepage = "http://www.mywebsite.com"
WshShell.RegWrite Homeloc,newhomepage,"REG_SZ"


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>