|
-
Jul 11th, 2003, 07:34 AM
#1
Thread Starter
Hyperactive Member
Finding the available ports in the computer and at the same time ignoring the port th
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
-
Jul 11th, 2003, 09:20 AM
#2
Lively Member
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
-
Jul 11th, 2003, 09:21 AM
#3
Lively Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|