Archive: Driver Pre-Installation Possible?


Driver Pre-Installation Possible?
  Hello,

I have a rather complex driver installation process and I'm wondering if it could be automated through NSIS.

I have a USB device that by default comes up in Windows as a "USB Composite Device" under the USB Serial Bus Controllers node in the device manager. Thus, Windows already knows about the vendor and hardware ID of the device.

For our software to operate, I need to manually Update the previous "USB Composite Device" driver for this device with a new driver and .inf file. After updating the driver, the new driver exposes a second USB device that Windows doesn't recognize and a second driver needs to be installed. This is very tedious for the use since neither driver is signed and he/she is prompted with the "Are you sure you want to install this unsigned driver?" message twice.

Does anyone have any thoughts on whether NSIS is suitable to handle this driver installation process? Are there any sample scripts that would be a good start?

Thank you.


The driver singing prompts can be disabled..

I don't have an unsigned driver readily available to test this with though.

    ## Disable the Driver Signing Prompt

WriteRegDWORD HKCU `Software\Policies\Microsoft\Windows NT\Driver Signing` BehaviorOnFailedVerify 0
ExecWait"gpupdate" # Run Microsoft's Group Policy Update utility to force the change.

You can also use the following to install a driver using the inf file.

    ## Install Driver using INF

InitPluginsDir
ExecWait`rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 "$PLUGINSDIR\UpdateNVidia.inf"`

There is an article on the NSIS Wiki that also will help.

http://nsis.sourceforge.net/Driver_installation_and_update
http://nsis.sourceforge.net/Driver_i...ion_and_update


Thanks for the input. That particular approach did not work for me. I was however able to use the sysUpdateDriverForPlugAndPlayDevices(...) system call to force the update of the driver. I am still not able to hide the unsigned driver warning message. That is annoying but can be handled in documentation. Currently, the drivers get installed which is the most important thing.

The current installer works only if the device is plugged in.

I'm wondering if there any way to "pre-install" the drivers so that Windows would choose the drivers I provide rather than the generic "USB Composite Device" driver when it does it's initial New Hardware enumeration. I'm not familiar enough with Windows driver search and selection method for USB device enumeration to know what is required for this. Any input would be appreciated.


sysprep
  If you are referring to preinstalling the driver on the OS, that process is called sysprep. OEMs and corporations use it to prebuild the windows system then "sysprep" it to act as a new windows install but with all the drivers and programs preinstalled.

A heavenly free utility exists that automates the creation of a windows install CD with this ability. Even make your own fully automated version of a windows CD. The program is called nLite and is available at:

http://www.nliteos.com
http://www.nliteos.com/

If you need to use vista the program is called vLite:

http://www.vlite.net
http://www.vlite.net/

If you want more on the topic, visit:
http://www.msfn.org/board/nlite-f89.html
http://www.msfn.org/board/nlite-f89.html


Thanks. I guess I was not clear. I certainly don't want to install or reinstall the OS.

I want to run a driver installation program to "pre-install" my drivers. So, after this so-called pre-installation, when a user plugs in my device into any USB port on his system, Windows will select my driver rather than the default USB Composite Device.

My current solution requires the user to plug in the deivce, then Windows recognizes it as a USB Composite Device, then the user must run my installation to forcibly overwrite the USB Composite Device. This is not an optimal solution.


Try http://support.microsoft.com/kb/314479 , start at "Existing Windows Installations."