I'm trying to get this particular segment of vbscript to work on Windows 7 and it's just not doing it. No errors or anything.
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,"EnableLinkedConnections",1
It works fine on XP and I'm running it as an admin.
Thanks
wscript your_script.vbsdoes it work? If so you're hitting UAC. – Chris S♦ Feb 7 '11 at 19:13SetDWORDValuemethod viaExecMethod_and then checking theOutParameters.ReturnValue. – Helen Feb 7 '11 at 20:14