Windows Vista Can't write VBScript into regedit.!

Joined
Mar 1, 2009
Messages
1
Reaction score
0
Option Explicit
Dim reg, strRoot, strModify, strFolder
strFolder = "NoFolderOptions"


strRoot = "HKLM\Software\Microsoft\" _
& "Windows\CurrentVersion\Policies\Explorer\"

set reg = WScript.CreateObject("WScript.Shell")
strModify = reg.RegWrite(strRoot & strFolder,"1", "REG_DWORD")
strModify = null
WScript.Quit

Here is some of the vbscript file i wrote. But when i run it on windows vista, i can't.! The error message shows me that "Invalid root in registry key.!" Can you please tell me how to solve this?
 
Back
Top