# Write Registry with VBSCRIPT



## aghtet85 (Feb 12, 2009)

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?


----------

