Gentlemen:
Does anyone knows where can I find a piece of code for finding the available ports in the computer and at the same time ignoring the port that the internal modem is connected to?
Thanks
Andy
Printable View
Gentlemen:
Does anyone knows where can I find a piece of code for finding the available ports in the computer and at the same time ignoring the port that the internal modem is connected to?
Thanks
Andy
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_PortConnector",,48)
For Each objItem in colItems
Wscript.Echo "Caption: " & objItem.Caption
Wscript.Echo "ConnectorPinout: " & objItem.ConnectorPinout
Wscript.Echo "ConnectorType: " & objItem.ConnectorType
Wscript.Echo "CreationClassName: " & objItem.CreationClassName
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "ExternalReferenceDesignator: " & objItem.ExternalReferenceDesignator
Wscript.Echo "InstallDate: " & objItem.InstallDate
Wscript.Echo "InternalReferenceDesignator: " & objItem.InternalReferenceDesignator
Wscript.Echo "Manufacturer: " & objItem.Manufacturer
Wscript.Echo "Model: " & objItem.Model
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "OtherIdentifyingInfo: " & objItem.OtherIdentifyingInfo
Wscript.Echo "PartNumber: " & objItem.PartNumber
Wscript.Echo "PortType: " & objItem.PortType
Wscript.Echo "PoweredOn: " & objItem.PoweredOn
Wscript.Echo "SerialNumber: " & objItem.SerialNumber
Wscript.Echo "SKU: " & objItem.SKU
Wscript.Echo "Status: " & objItem.Status
Wscript.Echo "Tag: " & objItem.Tag
Wscript.Echo "Version: " & objItem.Version
Next
sorry forgot this
first thing to check would be the IRD
If IRD = whatever the IRD code and name is
do whatever
else
the other code i posted before this
endif