Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = “.” Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!” & _
strComputer & “rootdefault:StdRegProv”) strKeyPath = “SYSTEMCurrentControlSetControlTerminal Server” strValueName = “fDenyTSConnections”
dwValue = 0
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue

 

Leave a Reply