Back to Home page
INFPINST.EXE is a command line utility that helps install
and uninstall device drivers. I'm using it with InnoSetup setup creator. It is an EXE file because not DLL nor
scripts can be used during uninstalltion process. Source and binary files you can find here.
Running this application without parameters makes nothing.
-i inf,hid,sec
(Pre)install or update device drivers. This option can be used multiple times.
inf : name of INF file, may be relative
hid : HardwareID of device
sec : install section in <inf> file (INF DDInstall section) used to install <hid> device this parameter is used where functionUpdateDevicesForPlugAndPlayDevicesis not implemented (Win98,Win98SE) section name is given without platform specific extension
-d inf,hid[,sec]
Uninstall device drivers. Parameters same as in -i option. Note that <inf> should not be located in %windir%\INF directory. This option can be used multiple times.
-I <file>
Instead of using -i option many times -I option may be used. <file> is a text file in which each line have parameters passed to -i option. Eg.
!This is file help installing some devices
<inf1>,<hid1>,<sec1>
<inf2>,<hid2>,<sec2>
<inf3>,<hid3>,<sec3>
...
This option may be used only once.
-D <file>
Instead of using -d option many times -D option may be used. <file> has format identical to -I option. This option may be used only once.
-k
Installed and uninstalled devices are PnP devices and may be safely removed. In case of -i or -I option this switch is used only in systems where UpdateDriverForPlugAndPlayDevices function is not implemented. In case of -d or -D option this removes from system ALL devices of <hid> HardwareID. Without this switch only INF files from %winroot%\INF directory are removed.
-s
Drivers of device are signed. This gives simpler installation.
-r
Re enumerates devices. Similar to Scan for new devices in device manager.
-p
Break work if another installation is pending.
-c <inf>
Install device class from <inf> file.
-f <log>
-F <log>
Sets location of log file where program puts location of preinstalled INF files. -F option opens <log> file in append mode. Log file is useful in uninstalltion process.
-u <inf>
Deletes <inf> file usually from %winroot%\INF directory. This option can be used multiple times.
-U <log>
Deletes INF files which paths are given in <log> file. <log> file usually was previously generated by -f or -F option. Each line in <log> file describes one full path to INF file. This option can be specified only once.
-v <level>
Set verbosity level to <level>. Default is 0 that mean no messages.
Assume you wrote device driver XXX.SYS and you wrote XXX.INF file too. In this XXX.INF file you specify HardwareID equal to PCI\VID_XXXX&PID_XXXX and install section XXX_inst. To install this device using INFPINST utility you may try:
INFPINST -i XXX.INF,PCI\VID_XXXX&PID_XXXX,XXX_inst -f c:\inflog.txt -k -v 5 -r
IF your device was successful installed c:\inflog.txt file should be created. This file looks like this:
c:\winnt\inf\oem12.inf
Now if you want to uninstall all instances of your driver you may wrote:
INFPINST -u XXX.INF,PCI\VID_XXXX&PID_XXXX,XXX_inst -k -U c:\inflog.txt -v 5
You may omit -k switch to remove INF files only without uninstalling devices. Note that -U option is needed only when you preinstall INF file(s) and these files are never used to install device.
Contact: roed@poczta.onet.pl