Jump to content
Sign in to follow this  
Manjish

Detect Unknown Devices

Recommended Posts

Manjish

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

Share this post


Link to post
Share on other sites
Starf0x
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?

Share this post


Link to post
Share on other sites
JLogan3o13

@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

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Starf0x

I know it was an old one, but just wanted to contribute to an unanswered question.
My apologies.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.