/build/static/layout/Breadcrumb_cap_w.png

Unattended HW Driver installation

Scenario: we have a device that's going to be given out to about 100 or so users.
I have hardware driver files, INF's etc. drivers signed, everything works fine, etc.
If the device isn't connected to the machine and you right click install on the inf or use a command like devcon, nothing gets installed
I would like to have the drivers pre-installed or staged on the machine so that when the user plugs in the device it just automagically finds the correct driver without the user being presented with prompts to go to windows update or browsing to the driver files.

Has anybody done something like this? Thanks in advance.

0 Comments   [ + ] Show comments

Answers (15)

Posted by: mchild 9 years ago
White Belt
0

use pnputil, it's built into windows


C:\Windows\system32>pnputil /?
Microsoft PnP Utility
Usage:
------
pnputil.exe [-f | -i] [ -? | -a | -d | -e ] <INF name>
Examples:
pnputil.exe -a a:\usbcam\USBCAM.INF      -> Add package specified by USBCAM.INF
pnputil.exe -a c:\drivers\*.inf          -> Add all packages in c:\drivers\
pnputil.exe -i -a a:\usbcam\USBCAM.INF   -> Add and install driver package
pnputil.exe -e                           -> Enumerate all 3rd party packages
pnputil.exe -d oem0.inf                  -> Delete package oem0.inf
pnputil.exe -f -d oem0.inf               -> Force delete package oem0.inf
pnputil.exe -?                           -> This usage screen


Comments:
  • pnputil.exe /add-driver "\\Server\Share$\MySoftware\MyOEMUSB.inf" /install
    Always shows a pop-up asking if you trust software from that company
    It makes automation of the installation impossible
    How can this be resolved? - Witto 2 years ago
Posted by: pramodp1621 13 years ago
Yellow Belt
0
HI, you can use DPinst.exe to install the driver without having the device plugged in. once the device is plugged in it will do a plug and play detection and should install the driver on its own.

see http://msdn.microsoft.com/en-us/library/ff544842(VS.85).aspx
Posted by: aogilmor 13 years ago
9th Degree Black Belt
0
thanks I'm downloading now...hope that resolves.
Posted by: aogilmor 13 years ago
9th Degree Black Belt
0
actually....I found that it DID NOT install the driver without the device. any idea what command lines make it do that? I didn't see anything useful. Thanks in advance. I still get the same stupid prompts when I plug in the device.

Usage: C:\WINDOWS\dpinst.exe [/U INF-file][/S | /Q][/LM][/P][/F][/SH][/SA][/A][/
PATH Path][/EL][/L LanguageID][/C][/D][/LogTitle Title][/SW][/? | /h | /help]

/U INF-file Uninstall a driver package (INF-file).
/S | /Q Silent (Quiet) mode. Suppresses the Device Installation Wizard
and any dialogs popped-up by the operating system.
/LM Legacy mode. Accepts unsigned driver packages and packages with missing
files. These packages won't install on the latest version of Windows.
/P Prompt if the driver package to be installed is not better than the cur
rent one.
/F Force install if the driver package is not better than the current one.

/SH Scans hardware for matching devices and only copies and installs those
drivers for which a device is present. Only valid for Plug and Play drivers.
/SA Suppress the Add/Remove Programs entry normally created for each driver
package.
/A Install all or none.
/PATH Path Search for driver packages under the given path.
/EL Enables all languages not explicitly listed in the XML file.
/L LanguageID Tries to use the given language in all UI. Useful for l
ocalization tests.
/SE Suppress the EULA.
/C Dump logging output to attached Console (Windows XP and above).
/D Delete driver binaries on uninstall.
/SW Suppresses the Device Installation Wizard, the operating system might s
till pop-up user dialogs.
/? | /h | /help Shows this help.

C:\Documents and Settings\aog5\Desktop\OMNIKEY - Other Hardware - ICCD>dpinst /s
/sa /se /c /sw

INFO: Option set: dumping log info to console.
INFO: Current working directory: 'C:\Documents and Settings\aog5\Desktop\OMNIK
EY - Other Hardware - ICCD'
INFO: Running on path 'C:\Documents and Settings\aog5\Desktop\OMNIKEY - Other
Hardware - ICCD'
INFO: No valid 'dpinst.xml' file provided.
INFO: Install option set: Suppressing Wizard but no OS popups.
INFO: Install option set: Running in quiet mode. Suppressing Wizard and OS pop
ups.
INFO: Install option set: Suppressing EULA.
INFO: Install option set: Suppress Add or Remove Programs entries.
INFO: Found driver package: 'C:\Documents and Settings\aog5\Desktop\OMNIKEY -
Other Hardware - ICCD\okiccdwdm.inf'.
INFO: Preinstalling 'c:\documents and settings\aog5\desktop\omnikey - other ha
rdware - iccd\okiccdwdm.inf' ...
INFO: ENTER: DriverPackagePreinstallW
INFO: okiccdwdm.inf: checking signature with catalog 'c:\documents and setting
s\aog5\desktop\omnikey - other hardware - iccd\okiccdwdm.cat' ...
INFO: Driver package 'okiccdwdm.inf' is WHQL signed.
SUCCESS:c:\documents and settings\aog5\desktop\omnikey - other hardware - iccd\o
kiccdwdm.inf is preinstalled.
INFO: RETURN: DriverPackagePreinstallW (0xB7)
INFO: ENTER: DriverPackageGetPathW
SUCCESS:Found driver store entry.
INFO: RETURN: DriverPackageGetPathW (0x0)
INFO: ENTER: DriverPackageInstallW
INFO: okiccdwdm.inf: checking signature with catalog 'c:\documents and setting
s\aog5\desktop\omnikey - other hardware - iccd\okiccdwdm.cat' ...
INFO: Driver package 'okiccdwdm.inf' is WHQL signed.
INFO: Installing INF file 'C:\WINDOWS\system32\DRVSTORE\okiccdwdm_3D6246074DAA
DE8A4A74B0AED68627C81D66D264\okiccdwdm.inf' of Type 6.
INFO: Looking for Model Section [OMNIKEY]...
INFO: Installing devices with Id "USB\Vid_0471&Pid_040f&Rev_0100" using INF "C
:\WINDOWS\system32\DRVSTORE\okiccdwdm_3D6246074DAADE8A4A74B0AED68627C81D66D264\o
kiccdwdm.inf".
INFO: Installation did not occur because the hardware isn't currently present.

INFO: Phantom Device with Hardware/Compatible Id 'USB\Vid_0471&Pid_040f&Rev_01
00' already has 'C:\WINDOWS\system32\DRVSTORE\okiccdwdm_3D6246074DAADE8A4A74B0AE
D68627C81D66D264\okiccdwdm.inf' installed on it.
INFO: No drivers installed. No devices found that match driver(s) contained in
'C:\WINDOWS\system32\DRVSTORE\okiccdwdm_3D6246074DAADE8A4A74B0AED68627C81D66D26
4\okiccdwdm.inf'.
SUCCESS:Installation completed with code 0xE000020B.
INFO: RETURN: DriverPackageInstallW (0xE000020B)
INFO: No matching device was found for 'c:\documents and settings\aog5\desktop
\omnikey - other hardware - iccd\okiccdwdm.inf'. Driver will be installed when p
lugged in.
INFO: Returning with code 0x100
C:\Documents and Settings\aog5\Desktop\OMNIKEY - Other Hardware - ICCD>
Posted by: pramodp1621 13 years ago
Yellow Belt
0
when you run the DPinst.exe makesure the driver inf is in the same folder as the dpinst.exe, ran it manually so you can see the messages.
Posted by: aogilmor 13 years ago
9th Degree Black Belt
0
OK i copied to same dir. pretty much the same code as above indicates it was "pre-installed" whatever that means.
But I still get the same "found new hardware" prompt when I plug the device in, and windows has no idea where the driver is.
So either I'm not using it right or dpinst is crap.
Posted by: anonymous_9363 13 years ago
Red Belt
0
Hey, Owen. Why not use the DifXApp merge module? It makes using DPInst a no-brainer.

And how did your post end up in this forum, not 'Package Development'?!?
Posted by: aogilmor 13 years ago
9th Degree Black Belt
0
Hi VB, i wasn't sure if it should go in pkg dev since it's a hardware/sysadmin issue. Thanks for the link. Looks like that'll make it easier to install the drivers but I wonder if that'll overcome the brain-dead windows "found new hardware" wizard even when the driver is already there, and correctly configures itself. that's the issue I'm facing now, not the driver install itself (dpinst it turns out did install the driver to a "phantom device" if the hw is not present and it's supposed to automatically install when the hw is plugged in. it does, but you also still get the brain dead windows found new hardware wizard that has no idea what the device is and where to find the driver)
thanks!
Owen
Posted by: anonymous_9363 13 years ago
Red Belt
0
Hmmm...I've not encountered that before for pre-installed drivers :-(

Maybe ProcMon can help you see what Windows is up to, in terms of searching for the driver, when you plug in the device?
Posted by: pjgeutjens 13 years ago
Red Belt
0
This could be completely off the mark, but have you checked if the location on the disk where the driver files were added is present in the DevicePath registry key? (HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\DevicePath).

As far as I understand it this lists all the locations where Windows will look for suitable drivers when attempting a silent device install. (Also see here)

PJ
Posted by: aogilmor 13 years ago
9th Degree Black Belt
0
PJ and Ian, thanks I will look into both of those things. This article offered some hope, but it turned out to be one of those Microsoft non-solutions, totally didn't work to suppress the prompt. Sheesh you wonder if these people ever try out their own solutions.
Posted by: aogilmor 13 years ago
9th Degree Black Belt
0
Thanks Ian, all: Looks like the difx merge module worked. installs silently, and the device recognizes the driver when plugged in.
And I shoulda put this in package dev. For some reason you can't rate posts in this forum....wonder why?
Posted by: resakol 12 years ago
Yellow Belt
0
I had the same issue for almost 2 weeks but after reading this post i fixed the issue. thank you guys for helping .
Posted by: samsafeauto 12 years ago
Yellow Belt
0
you guys are a Godsend. Ive been having this problem and had no idea how to solve it! Thank you!
Posted by: Martureo 6 years ago
White Belt
0

if using the pnputil.exe, how do you make it a silent install?

also, the instructions for the Difx module weren't very clear - can anyone elaborate for me?

im trying to install device drivers on Win10 so they are plugnplay later


many thanks in advance!

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ