Uninstalling a driver via batch file

WMIC is best choice for accomplishing this via command line.

wmic sysdriver where name="drivernamehere" call delete

devcon.exe is another alternative for batch.

http://support.microsoft.com/kb/311272

EDIT: Use this to get find the correct name

wmic sysdriver get name

wmic sysdriver where "name=drivernamehere" call delete

The syntax above appears to be incorrect. I tried and always got "delete - Invalid alias verb" I looked up the syntax and came up with the following that appears to work:

wmic sysdriver where name="driver_name" delete

I got instance deletion successful but I have to verify whether this completely removes the driver from the system or not.


Actually, the correct syntax should be as follows:

wmic sysdriver where(name="driver_name") delete