Automated driver installation

According to my project howto install software silently I came accross a new challenge how to handle an automated implementation of windows based drivers when we have no setup binary for the driver installation.

S7driver

First I was stuck, but finally I found a solution how to solve this challenge. During my researches I’ve discovered a tool called devcon.exe from microsoft. Devcon is part of the Windows Driver Kit an can be found here.

DevCon (Devcon.exe), the Device Console, is a command-line tool that displays detailed information about devices on computers running Windows. You can use DevCon to enable, disable, install, configure, and remove devices.

After downloading the the Windows Driver Kit we see a bunch of msi installers, but we only need to install the following one: Windows Driver Kit-x86_en-us.msi

windows_drivers1

If we check the installation directory we find the devcon.exe that we copy to a sample location where a inf file is stored.

windows_drivers2

Let’s have a closer look what we can do with devcon.exe. The command to install a scpecific inf file is: devcon.exe dp_add drivername.inf

Sometimes it works without problems and we get: Driver package added

windows_drivers4

It can’t be that easy! Let’s try another one and a windows security message pops out 😉

windows_drivers5

To overcome this, I had to find a way that Windows will trust my driver source or something that will accept this message automatically. I’ve decided to find a solution for the second option and I’ve discoverd AutoIT, a powerfull scripting engine! 🙂

AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting. It uses a combination of simulated keystrokes, mouse movement and window/control manipulation in order to automate tasks in a way not possible or reliable with other languages

I’m amazed! 😀

AutoItIT  comes with a helper tool that read out usefull informations about a target window.

auto_it1

With help of this informations I wrote a simple script with AutoIT to autmate this task:

auto_it2

Another advantage of that tool is that it’s possible to create a binary file. I did successfull test this in a virtual machine, but I want to see this if it works when I plug in a spcific hardware that require a driver.

Altera_board

First I got a driver error and after running my AutoIt binary file I could successfull implement the driver and the board can be seen in the windows device manager 🙂

usb-blaster

usb-blasterII

Note: the final deployment task will I do with RES One Automation Manager

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.