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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top