Код для выполнения ping-операций и подключения к StdRegProv
? Before connecting to the computer, use ping to see whether you get a response.
? A WMI connection attempt isn?t used because WMI?s connection timeout interval
? is too long.
Set objExec = objShell.Exec(«ping -n 2 -w 1000 « & strComputer)
strPingStdOut = LCase(objExec.StdOut.ReadAll)
? Test whether ping was successful.
If InStr(strPingStdOut, «reply from «) Then
? BEGIN CALLOUT A
? Connect to the registry provider on a remote computer.
Set objRegistry=GetObject(«winmgmts:{impersonationLevel=impersonate}!» &_
strComputer & «
ootdefault:StdRegProv»)
? END CALLOUT A