WMI Scripting Questions
-
From the user logon script I am attempting to determine whether or not the connection is via a dial-up connection or through the Ethernet adapter. The clients are all running Windows 2000. I have been trying to use WMI to extract the information. I can successfully pull information using the Win32_POTSModem, but this does not provide information about an actual connection. When I tried to use Win32_SerialPortConfiguration I began having problems getting the script to run properly. I have provided the SUB I am using. Any advice anyone have would be appreciated. Private Sub Check_Modem() Dim objWMI, objModemSet, Modem, ModemInfo Dim SerialPortSet, SerialPort, SerialPortInfo Dim Dialup AS Boolean Set objWMI = GetObject("winmgmts:") Set objModemSet = objWMI.InstancesOf("Win32_POTSModem") Set objSerialPortSet = objWMI.InstancesOf("Win32_SerialPortConfiguration") For Each Modem In objModemSet For Each SerialPort in objSerialPortSet If SerialPort.Name = Modem.AttachedTo Then If SerialPort.IsBusy Then Dialup=True End If End If Next Next End sub Thanks Joe Paisley Smurfit-Stone Container X| Joe Paisley