Unattended HW Driver installation
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.
Answers (15)
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 3 years ago
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>
And how did your post end up in this forum, not 'Package Development'?!?
thanks!
Owen
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
so that the conversation will remain readable.