Importing a registry key on startup?
Always used to use the following as a startup script on XP:
But now it does nothing. I cant even run it when logged on as myself, I get an error saying that the system cannot find the file specified on line 3. But it does start regedit first, so its something do with the actual import I guess?
Set wsh = WScript.CreateObject("WScript.Shell")
wsh.Run "%SystemRoot%\regedit.exe /S regkeytoimport.reg", , True
I've tried with different scripts, and the .reg file is in the same folder. What am I doing wrong or does 7 just not support this method?
Ive tried using the 'new' bit of group policy to do this, but although it lets you import/replace keys, you have to type the value in, and what we are trying to import has quite a few subkeys