Jump to content

Script to reinstall drivers for unknown devices


Recommended Posts

Hello,

I would like to make a script to install the drivers for the unknown devices,taking them inside a folder with a lot of subfolders. The only solution I found right now is to move the mouse cursor and to click over all the entries of the device manager,but it is a big work and it is not very reliable. How can AutoIt identify which are the devices with a missing driver ? Since using the screen coordinates is not so good,do you know a way to get a text from the device manager and move the mouse cursor right there ? Thanks in advance for any suggestion.

Link to comment
Share on other sites

This is what I did :

0) Installed AutoIt.

1) Created the folder C:\DriverFiles and inside it put these files and folders :

folder NT5 and inside it put the file INFSniff.au3

folder NT6 X64 inside it put the file INFSniff.au3

folder NT6 X86 inside it put the file INFSniff.au3

7z.exe

7z.dll

deviceAPI.au3

DeviceInstall.au3

dpinst.exe

dpinst.xml

dpinst64.exe

INFSniff.au3

DeviceInstall.exe

2) Created the folder c:\Drivers and inside it put the file DeviceInstall.exe and the drivers backupped and compressed with 7z.

3) Gone into the folder c:\DriverFiles\NT5 and ran INFSniff.au3. It asked to me to provide the name of the folder where are located the compressed driver files. Chosen C:\Drivers

4) Gone into the folder c:\Drivers and checked if has been created the file HWIDrepository.txt. Started the restore of the missing drivers. Here I'm stuck,because it says that it can't find this file : C:\DOCUME^1\AC46D^1.A-5\IMPOST^1\Temp\2971\oem0.inf\dpinst.exe. I don't know where should I place it. Please help,thanks.

Link to comment
Share on other sites

3) Gone into the folder c:\DriverFiles\NT5 and ran INFSniff.au3. It asked to me to provide the name of the folder where are located the compressed driver files. Chosen C:\Drivers

You should choose C:\Drivers\NT5 when that is done run INFSniff.exe again choosing C:\Drivers\NT6x86 at soon that is done run INFSniff.exe one more time choosing C:\Drivers\NT6x64.
AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

Done,but it does not work again. The script need to find dpinst.exe in the temp + driver inf file n.1 + random number folder,but this file is not there. Maybe there is a bug inside the source code ? Anyway I'm not using the Driver's Pack device drivers,but the drivers backupped with a tool. They inf files I have are named from oem0 to oem7 plus I have a lot of dll,exe,nvu files,that I have compressed using 7z.

Link to comment
Share on other sites

To be more precise,inside C:\Drivers I have these inf files : ks,oem0,oem1,oem2,oem4,oem5,oem6,oem7,wdmaudio plus a lot of other files.

I have packed all the files with 7z and I saved the packed file (Drivers.7z) inside C:\Drivers.

When I run DeviceInstall.exe inside C:\Drivers folder,it looks for the file dpinst.exe in these folders :

1) temp folder (c:\documents and settings\a.A-58834BC4D4D64\Impostazioni locali\Temp) + (\) + random number folder (4371) + oem0.inf

2) temp folder (c:\documents and settings\a.A-58834BC4D4D64\Impostazioni locali\Temp) + (\) + random number folder (4371) + oem4.inf

3) temp folder (c:\documents and settings\a.A-58834BC4D4D64\Impostazioni locali\Temp) + (\) + random number folder (4371) + oem5.inf

4) temp folder (c:\documents and settings\a.A-58834BC4D4D64\Impostazioni locali\Temp) + (\) + random number folder (4371) + oem6.inf

5) temp folder (c:\documents and settings\a.A-58834BC4D4D64\Impostazioni locali\Temp) + (\) + random number folder (4371) + oem7.inf

6) temp folder (c:\documents and settings\a.A-58834BC4D4D64\Impostazioni locali\Temp) + (\) + random number folder (4371) + oem1.inf

but dpinst.exe is never there and the driver's restore fails.

Edited by marietto
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...