Jump to content

Detect Unknown Devices


Manjish
 Share

Recommended Posts

Hey can any1 write a script which can detect only the unknown device drivers and write it in notepad. Sort of a log for the unknown devices in the systme.

A simple script in auto it.. not using DevCon or MSDN or UDF or nething else.. just a simple and sweet Auto IT script!

[font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com
Link to comment
Share on other sites

  • 8 years later...
Func ReportHardware()
    ; Check if there are hardware devices without drivers
    Local $objWMIService
    Local $colItems
    Local $bolOK
    $objWMIService = ObjGet("winmgmts:\\" & @ComputerName & "\root\cimv2")
    $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_PnPEntity")
    For $objItem In $colItems
        If $objItem.Status = "Error" Then
            If StringInStr($objItem.Name, "PS/2") > 0 Then
                $bolOK = True
            ElseIf StringInStr($objItem.Name, "Cisco") > 0 Then
                $bolOK = True
            Else
                ConsoleWrite($objItem.Name & @CRLF)
                $bolOK = False
            EndIf
        EndIf
    Next
    Return $bolOK
EndFunc   ;==>ReportHardware

Is this it?

Link to comment
Share on other sites

  • Moderators

@Starf0x did you happen to notice that this thread is over 8 years old?? I'm willing to guess the OP (who hasn't even been on the site in 4 years) is probably not still seeking the answer. Please do not resurrect old threads.

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...