Sign in to follow this  
Followers 0
Shyke

Finding network card resource?

2 posts in this topic

I have recently started a program to increase the boot speed, drive speed and internet speed and it is working really well but I need to know the resource number of the user's network card.. the one that feeds to the modem/router.

Here is how you find it manually:

Run " msinfo32.exe " (no quotes)

" Hardware Resources " ---> " IRQs " (no quotes for any of this)

There you are given a list of system resources and manually the user must find the resource ID (mine is 16) of thier network card (mine is Linksys NC100 Fast Ethernet Adapter).

How could I get AutoIt to automatically get the ID?

Share this post


Link to post
Share on other sites



How could I get AutoIt to automatically get the ID?

This will give you more than you want. You can figure out how to delete the pieces you don't need. Courtesy of AutoIT Scriptomatic. It works for me in beta 75:

; Generated by AutoIt Scriptomatic

$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$colItems = ""
$strComputer = "localhost"

$Output=""
$Output = $Output & "Computer: " & $strComputer  & @CRLF
$Output = $Output & "==========================================" & @CRLF
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_IRQResource", "WQL", _
                                          $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

If IsObj($colItems) then
   For $objItem In $colItems
      $Output = $Output & "Availability: " & $objItem.Availability & @CRLF
      $Output = $Output & "Caption: " & $objItem.Caption & @CRLF
      $Output = $Output & "CreationClassName: " & $objItem.CreationClassName & @CRLF
      $Output = $Output & "CSCreationClassName: " & $objItem.CSCreationClassName & @CRLF
      $Output = $Output & "CSName: " & $objItem.CSName & @CRLF
      $Output = $Output & "Description: " & $objItem.Description & @CRLF
      $Output = $Output & "Hardware: " & $objItem.Hardware & @CRLF
      $Output = $Output & "InstallDate: " & WMIDateStringToDate($objItem.InstallDate) & @CRLF
      $Output = $Output & "IRQNumber: " & $objItem.IRQNumber & @CRLF
      $Output = $Output & "Name: " & $objItem.Name & @CRLF
      $Output = $Output & "Shareable: " & $objItem.Shareable & @CRLF
      $Output = $Output & "Status: " & $objItem.Status & @CRLF
      $Output = $Output & "TriggerLevel: " & $objItem.TriggerLevel & @CRLF
      $Output = $Output & "TriggerType: " & $objItem.TriggerType & @CRLF
      $Output = $Output & "Vector: " & $objItem.Vector & @CRLF
      if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop
      $Output=""
   Next
Else
   Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_IRQResource" )
Endif


Func WMIDateStringToDate($dtmDate)

    Return (StringMid($dtmDate, 5, 2) & "/" & _
    StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _
    & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate,13, 2))
EndFunc

...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0