Results 1 to 3 of 3

Thread: Finding the available ports in the computer and at the same time ignoring the port th

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2003
    Posts
    376

    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

  2. #2
    Lively Member
    Join Date
    Jun 2003
    Posts
    124
    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

  3. #3
    Lively Member
    Join Date
    Jun 2003
    Posts
    124
    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
  •  



Click Here to Expand Forum to Full Width