How to uninstall a driver from recovery console

I recently updated the "Standard AHCI Driver" (whatever it was called), to the one suggested on the laptop manufacturer's website.

At first, it kept going through the automatic recovery process. With much trouble, I managed to get the Windows 8 installation to boot into safe mode and stop it from automatically trying to fix startup (which was not working).

Now, when the computer restarts, it complains about iaStor.sys being invalid and / or missing. This makes sense, since the offending driver is causing all of these issues.

My question now- is there a way I can revert to the Standard AHCI Driver? Possibly using a recovery console? I want to avoid re-installing Windows, which is the only way I can see to fix this problem now.


Solution 1:

I ran into following error with pnputil -e on the latest Windows 10 repair console:

No published driver packages were found on the system

I had to use dism

Listing drivers:

dism /image:c:\ /get-drivers

Removing a driver:

dism /image:c:\ /remove-driver /driver:oem#.inf

Use list vol inside diskpart to get the assigned drive letter of your windows partition and replace /image:c:\ with it

Solution 2:

I'm guessing the offending driver is not shown in Device Manager while in Safe Mode? If it is shown, you should be able to rollback or install the standard driver from there.

Otherwise, from Safe Mode (and possibly the recovery console), you can use pnputil.exe to uninstall the driver.

Type pnputil -e to show a list of installed drivers.
You may want to use pnputil -e | more so the list is output one screen at a time.
After you've located the driver in the list, note the inf file shown for the driver (e.g., oem00.inf).
Type pnputil -d oem00.inf to delete the driver.
You may need to use pnputil -f -d oem00.inf to force deletion.