const HKEY_LOCAL_MACHINE = &H80000002
If (Wscript.Arguments.Count)<>2 Then
WScript.Echo ("Usage : cscript guidstore.vbs -s
WScript.Quit(1)
End If
If lcase(WScript.Arguments(0))="-s" Then
strcomputer=WScript.Arguments(1)
End If
Set StdOut = WScript.StdOut
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Services\MSExchangeIS\" & strcomputer
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
StdOut.WriteLine subkey
SubKeys = "SYSTEM\CurrentControlSet\Services\MSExchangeIS\" & strcomputer & "\" & subkey
strValueName = "Guid-Replid Caching"
dwValue = 0
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,SubKeys,strValueName,dwValue
Next
No comments:
Post a Comment