1

How can I install and uninstall a driver from the command line during a console session?

I have the driver.sys and the driver.inf file, and I want to:

  1. install the driver
  2. use the device managed by the driver (software or hardware)
  3. uninstall the driver
ZEE
  • 1,014

1 Answers1

1

DevCon seem to be the option for meeting your needs. DevCon is built to support Windows XP, while pnpUtil is supported in Windows Vista and later so the supposed duplicate question does not apply here since pnpUtil will not work in your case. Once you've downloaded DevCon, and extracted it, open a command prompt to the directory where devcon.exe is located. If you're using a 32-bit version of XP, you'll want to make sure you use the devcon.exe located in the i386 directory and not the one located in ia64 directory. Run the command as follows to install:

devcon install name_of_inf.inf

Use the following to remove a device driver:

devcon remove <hardware_id>

If you're not sure what the hardware_id is for a given device installed use

devcon findall *