JohannesM Posted November 5, 2010 Share Posted November 5, 2010 Hello, will it be possible in the future to get more Information about Drivers? Maybe location, and/or version would be nice. - Johannes M. Link to comment Share on other sites More sharing options...
engjcowi Posted May 26, 2011 Share Posted May 26, 2011 Hi Hows this project coming? I think it woul dbe useful if this can give a quick listing on which drivers arent installed properly or on any unknown devices jamie Drunken Frat-Boy Monkey Garbage Link to comment Share on other sites More sharing options...
llewxam Posted May 26, 2011 Share Posted May 26, 2011 Hi Hows this project coming?I think it woul dbe useful if this can give a quick listing on which drivers arent installed properly or on any unknown devicesjamieNot to thread-jack, more a shameless plug..... A new version of my HWID-based driver installer is being worked on by myself, Danny35d, and Storme which will be able to install your missing drivers (all or just devices you choose), and if it can't find a good match it will at least let you have quick clipboard access to the HWID so you can Google it. We will also have a backup option available, as well as an updater.A timetable is hard to say but a huge chunk of the features are done already.Ian My projects: IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged. INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them. PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses. Sync Tool - Folder sync tool with lots of real time information and several checking methods. USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions. Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent. CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction. MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app. 2048 Game - My version of 2048, fun tile game. Juice Lab - Ecigarette liquid making calculator. Data Protector - Secure notes to save sensitive information. VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive. Find in File - Searches files containing a specified phrase. Link to comment Share on other sites More sharing options...
iprob Posted June 28, 2011 Share Posted June 28, 2011 I was trying to add the function SetupDiRemoveDevice. I'm using this amazing script to remove some orphaned volume shadow copies. The function I added was as follows: ; #FUNCTION# ==================================================================================================================== ; Name...........: _DeviceAPI_RemoveDevice ; Description ...: Get class name from class GUID ; Syntax.........: - ; Parameters ....: - ; Return values .: Success - String ; Failure - NULL String, @ERROR set ; Author ........: Matthew Horn (weaponx) ; Modified.......: - ; Remarks .......: - ; Related .......: - ; Link ..........; @@MsdnLink@@ - http://msdn.microsoft.com/en-us/library/ms792990.aspx ; Example .......; Yes ; =============================================================================================================================== Func _DeviceAPI_RemoveDevice() Local $result = DllCall($setupapi_dll,"int","SetupDiRemoveDevice","hwnd", $hDevInfo,"ptr", $pSP_DEVINFO_DATA) If @ERROR Then Return SetError(@ERROR,@EXTENDED,"") Else ;Check for WinAPI error $WinAPI_Error = _WinAPI_GetLastError() If $WinAPI_Error <> 0 Then ;ConsoleWrite("Error " & _WinAPI_GetLastError() & ": " & _WinAPI_GetLastErrorMessage()) ;Exit Return SetError(1,1,0) Else ;Debug($result) Return $result[1] EndIf EndIf EndFunc The function doesn't appear to be removing the device. Any suggestions? Does this function already exist in the code? Rob Link to comment Share on other sites More sharing options...
iprob Posted June 28, 2011 Share Posted June 28, 2011 Here is the function that worked for me. ; #FUNCTION# ==================================================================================================================== ; Name...........: _DeviceAPI_RemoveDevice ; Description ...: Get class name from class GUID ; Syntax.........: - ; Parameters ....: - ; Return values .: Success - String ; Failure - NULL String, @ERROR set ; Author ........: Matthew Horn (weaponx) ; Modified.......: - ; Remarks .......: - ; Related .......: - ; Link ..........; @@MsdnLink@@ - http://msdn.microsoft.com/en-us/library/ms792990.aspx ; Example .......; Yes ; =============================================================================================================================== Func _DeviceAPI_RemoveDevice() Local $result = DllCall($setupapi_dll,"int","SetupDiCallClassInstaller","dword", 5,"hwnd", $hDevInfo,"ptr", $pSP_DEVINFO_DATA) If @ERROR Then Return SetError(@ERROR,@EXTENDED,"") Else ;Check for WinAPI error $WinAPI_Error = _WinAPI_GetLastError() If $WinAPI_Error <> 0 Then ;ConsoleWrite("Error " & _WinAPI_GetLastError() & ": " & _WinAPI_GetLastErrorMessage()) ;Exit Return SetError(1,1,0) Else ;Debug($result) Return $result[3] EndIf EndIf EndFunc Link to comment Share on other sites More sharing options...
Tjalve Posted February 9, 2012 Share Posted February 9, 2012 This is exactly what i was looking for. However i cant get it to work. When i run the example scripts i just can blank rows like this: Class Name: Class GUID: Hardware ID: Unique Instance ID: 0 Manufacturer: Driver: Friendly Name: Physical Device Object Name: Upper Filters: Lower Filters: Enumerator: Link to comment Share on other sites More sharing options...
spudw2k Posted March 20, 2012 Share Posted March 20, 2012 (edited) I am experiencing a strange behavior. If I run a simple script (based on example) it does not return any info if run from a network path (compiled or not). Any insight as to why that may be? #include <DeviceAPI.au3> ;Build list of ALL device classes _DeviceAPI_GetAllDevices() ;Loop through all devices by index While _DeviceAPI_EnumDevices() $string = "+"& _DeviceAPI_GetDeviceRegistryProperty($SPDRP_DEVICEDESC) & @CRLF $string &= "Class Name: " & _DeviceAPI_GetClassName(_DeviceAPI_GetDeviceRegistryProperty($SPDRP_CLASSGUID)) & @CRLF $string &= "Manufacturer: " & _DeviceAPI_GetDeviceRegistryProperty($SPDRP_MFG) & @CRLF $string &= @CRLF FileWriteLine("C:tempdevices.txt", $string) WEnd _DeviceAPI_DestroyDeviceInfoList() ;Cleanup for good measure Edit: I figured it out. I needed to call _DeviceAPI_Open(); strange that even though it doesn't get called it still works if run locally. Edited March 27, 2012 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
VAG Posted October 23, 2012 Share Posted October 23, 2012 I'm trying to use the DeviceAPI.au3 to monitor some USB device connection. Following the example, I have created the following codes to check for device appearing in the Device Manager. What I noticed is that DeviceAPI can only list out devices already ready before running the script. If I unplug the device first and plug it in again during script run, the looping of _DeviceAPI_GetClassArray() cannot detect the device. Is there any other ways to do this? $DeviceName = "Microsoft Hardware USB Mouse" $DeviceClass = "Human Interface Devices" Do ConsoleWrite(@CRLF & "Checking for [" & $DeviceName & "]...") Sleep(5000) Until HWDevice_Detect($DeviceName, $DeviceClass) = True Func HWDevice_Detect($devicename, $classname) Local $DeviceListed = False Local $aClasses = _DeviceAPI_GetClassArray() For $X = 0 to Ubound($aClasses)-1 If $aClasses[$X][2] = $classname Then Local $aDevices = _DeviceAPI_GetDeviceArray($aClasses[$X][0]) For $Y = 0 to Ubound($aDevices)-1 If $aDevices[$Y][1] = $devicename Then $DeviceListed = True EndIf Next EndIf Next If $DeviceListed = True Then Return True Else Return False EndIf EndFunc Link to comment Share on other sites More sharing options...
ptrex Posted October 24, 2012 Share Posted October 24, 2012 @VAGEither use WMI$objWMIService = ObjGet("winmgmts:" & $strComputer & "rootCIMV2") $m_MediaConnectWatcher = $objWMIService.ExecNotificationQuery("SELECT * FROM __InstanceCreationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_DiskDrive'")Or use the WM_DEVICECHANGE API approach shwon hereRgds,ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Ontosy Posted October 27, 2012 Share Posted October 27, 2012 Can anyone upload DeviceAPI.au3 ? The site is offline. Link to comment Share on other sites More sharing options...
llewxam Posted October 27, 2012 Share Posted October 27, 2012 Here ya go.DeviceAPI.au3 My projects: IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged. INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them. PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses. Sync Tool - Folder sync tool with lots of real time information and several checking methods. USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions. Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent. CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction. MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app. 2048 Game - My version of 2048, fun tile game. Juice Lab - Ecigarette liquid making calculator. Data Protector - Secure notes to save sensitive information. VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive. Find in File - Searches files containing a specified phrase. Link to comment Share on other sites More sharing options...
Ontosy Posted October 27, 2012 Share Posted October 27, 2012 ty Link to comment Share on other sites More sharing options...
mesale0077 Posted February 12, 2014 Share Posted February 12, 2014 DeviceAPI_Example.au3DeviceAPI_GUI Example.au3DeviceAPI.au3 - Alpha v6 link broken new link please Link to comment Share on other sites More sharing options...
llewxam Posted February 13, 2014 Share Posted February 13, 2014 Enjoy Ian DeviceAPI.au3DeviceAPI_GUI_Example.au3DeviceAPI_Example.au3 mesale0077 1 My projects: IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged. INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them. PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses. Sync Tool - Folder sync tool with lots of real time information and several checking methods. USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions. Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent. CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction. MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app. 2048 Game - My version of 2048, fun tile game. Juice Lab - Ecigarette liquid making calculator. Data Protector - Secure notes to save sensitive information. VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive. Find in File - Searches files containing a specified phrase. Link to comment Share on other sites More sharing options...
ilko Posted February 26, 2014 Share Posted February 26, 2014 (edited) Quite useful, thanks. It seems _DeviceAPI_GetDeviceRegistryProperty($SPDRP_COMPATIBLEIDS) returns only one of the compatible IDs. Looking at SetupApi.au3 here, which couldn't get going either, there are a few more structures and cases needed, if I get it right. Can someone experienced shed some light? I was trying to go through MSDN documentation without much success. Added: Got SetupApi.au3 from above working as in here: #include <SetupApi.au3> Dim $hDevs, $tDevInfo, $sDeviceID, $devicename[1][2] = [[0]] $hDevs = _SetupDiGetClassDevs($DIGCF_ALLCLASSES) While _SetupDiEnumDeviceInfo($hDevs, $devicename[0][0], $tDevInfo) $devicename[0][0] += 1 ConsoleWrite("----------- Index: " & $devicename[0][0] & " -------------" & @CRLF ) $sDescr = _SetupDiGetDeviceRegistryProperty($hDevs, $tDevInfo, $SPDRP_DEVICEDESC) $sName = _SetupDiGetDeviceRegistryProperty($hDevs, $tDevInfo, $SPDRP_FRIENDLYNAME) $sHWID = _SetupDiGetDeviceRegistryProperty($hDevs, $tDevInfo, $SPDRP_HARDWAREID) $sCHWID = _SetupDiGetDeviceRegistryProperty($hDevs, $tDevInfo, $SPDRP_COMPATIBLEIDS) ConsoleWrite("Description: " & $sDescr & @CRLF) ConsoleWrite("Friendly Name: " & $sName & @CRLF) ConsoleWrite("Hardware IDs: " & @CRLF & $sHWID & @CRLF) ConsoleWrite("Compatible HardwareIDs: " & @CRLF & $sCHWID & @CRLF) ; ConsoleWrite("------------------------" & @CRLF & @CRLF) ReDim $devicename[$devicename[0][0] + 1][2] WEnd _SetupDiDestroyDeviceInfoList($hDevs) It appears that _DeviceAPI_GetDeviceRegistryProperty in DeviceAPI.au3 and $SPDRP_HARDWAREID should be returning some more data, all the HardwareIDs, just like with $SPDRP_COMPATIBLEIDS. Another question, what would be Matching Device ID, as displayed in Device manager details page? I can't see any similar SPDRP_ constant. Edited February 27, 2014 by ilko Link to comment Share on other sites More sharing options...
Biatu Posted July 2, 2014 Share Posted July 2, 2014 Examples no longer work, devices show up blank, and property fields are blank. Running WIndows Enterprise x64 What is what? What is what. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 2, 2014 Moderators Share Posted July 2, 2014 Windows what Enterprise (7 or 8)? And please post a specific reproducer that does not work for you. "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 More sharing options...
Biatu Posted July 2, 2014 Share Posted July 2, 2014 Win7 and using examples. Gui and console have same result. What is what? What is what. Link to comment Share on other sites More sharing options...
llewxam Posted July 2, 2014 Share Posted July 2, 2014 Is this what you are seeing with the DeviceAPI_GUI_Example script? I run Win 7 x64, and confirm the DeviceAPI_GUI_Example script does not seem right. Oddly, an abandoned project using the same DeviceAPI.au3 still works properly. If I get a chance I'll try to look in to why the original DeviceAPI_GUI_Example is not happy. BTW, I tested with AutoIt 3.3.12.0 Ian My projects: IP Scanner - Multi-threaded ping tool to scan your available networks for used and available IP addresses, shows ping times, resolves IPs in to host names, and allows individual IPs to be pinged. INFSniff - Great technicians tool - a tool which scans DriverPacks archives for INF files and parses out the HWIDs to a database file, and rapidly scans the local machine's HWIDs, searches the database for matches, and installs them. PPK3 (Persistent Process Killer V3) - Another for the techs - suppress running processes that you need to keep away, helpful when fighting spyware/viruses. Sync Tool - Folder sync tool with lots of real time information and several checking methods. USMT Front End - Front End for Microsoft's User State Migration Tool, including all files needed for USMT 3.01 and 4.01, 32 bit and 64 bit versions. Audit Tool - Computer audit tool to gather vital hardware, Windows, and Office information for IT managers and field techs. Capabilities include creating a customized site agent. CSV Viewer - Displays CSV files with automatic column sizing and font selection. Lines can also be copied to the clipboard for data extraction. MyDirStat - Lists number and size of files on a drive or specified path, allows for deletion within the app. 2048 Game - My version of 2048, fun tile game. Juice Lab - Ecigarette liquid making calculator. Data Protector - Secure notes to save sensitive information. VHD Footer - Add a footer to a forensic hard drive image to allow it to be mounted or used as a virtual machine hard drive. Find in File - Searches files containing a specified phrase. Link to comment Share on other sites More sharing options...
Biatu Posted July 3, 2014 Share Posted July 3, 2014 (edited) Is this what you are seeing with the DeviceAPI_GUI_Example script? I run Win 7 x64, and confirm the DeviceAPI_GUI_Example script does not seem right. Oddly, an abandoned project using the same DeviceAPI.au3 still works properly. If I get a chance I'll try to look in to why the original DeviceAPI_GUI_Example is not happy. BTW, I tested with AutoIt 3.3.12.0 Ian Thank you, yes this is the example I refer to, the other one that outputs to consle has same results. I am using the latest version of autoit Edited July 3, 2014 by Biatu What is what? What is what. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now