View Single Post
  #5  
Old July 15th 20, 10:13 PM posted to microsoft.public.windowsxp.general
Paul[_32_]
external usenet poster
 
Posts: 11,873
Default How do I uninstall an INF file?

JJ wrote:
On Wed, 15 Jul 2020 16:44:08 +0800, Lu Wei wrote:
I right clicked an driver inf file and selected "install". It got
installed without any prompt, which is normal. Then, how do I
*uninstall* it? The context menu do not provide an "uninstall" command,
nor in control panel, nor in device manager, even
"devmgr_show_nonpresent_devices=1" is set.


That environment variable simply enables the possibility to display devices
which are previously installed, but no longer exist/plugged. You still need
to show hidden devices from the View menu of the Device Manager.

Also FYI, INF file is basically just a software script. While usually it
contains both installation and uninstallation tasks, both of the tasks are
optional. An INF file may contain other task, but no installation and
uninstallation task. e.g. reset some registry settings.

So, it depends on the contents of the INF file. But for driver INF file, the
driver is not normally installable via right-click-Install popup menu from
the Windows Explorer - even if it doesn't display any error. In this case,
the driver never did installed into the system. Most driver INF file can
only be used from the "Add Hardware" control panel. But for driver INF file
which actually installable via right-click-Install popup menu, the driver
is usually for non PnP device. In Device manager, the device is placed under
the "Non-Plug and Play Drivers" node which is hidden by default.


How you manage this on a Promise 20378, is to install
the "plain" INF, then if you want RAID, you install the
"RAID" INF over top. And if you want to switch back,
you install the "plain" INF again over top. The last
one installed, is the driver set that's running
at the time.

Promise likes to make installs which only include an INF
and no removal mechanism.

And there's also no guarantee that such swashbuckling
will end well. You could just end up with a giant mess
without too much trouble.

This mechanism is, of course, entirely unsatisfactory.
And, unhygienic. And about as much fun as gutting a
fish with a dull knife.

The driver files themselves, would be stored in more than
one folder, so that Windows File Protection can work.
It would be a deception to think that "just deleting blah.sys"
is the end of the story. You'd have to find all of the
copies of blah.sys, and likely, while running Linux or
something, for easy access to them.

The INF files, there are two copies. There is "original.INF",
but once installed, the OS renames the file to "OEM23.INF"
and the INF files are numbered sequentially. The next file
would be "OEM24.INF" if yet another one needed to be created.

Since I don't know exactly what to do about this,
I'll leave the answer right there. I can describe it's
a mess, but maybe some third party tool will make removal
more convenient.

Historically, Windows hardly ever cleans up anything when
you ask it. Uninstalling programs never gives a desired result.
The cache with the MSI files in it never gets cleaned up.
And so on. Just about anything you can think of, is ****ed up.
At least WinSXS on the later OSes, got a minor and cursory
cleanup, in response to IT people pounding on Microsoft to
fix this. People who manage VMs complained that the
bloat was making their VM images too large.

*******

Device Manager (and devcon) have options to remove a driver,
but I really wonder whether any cached copies are also
removed so the thing cannot come back on the next reboot
or whatever.

Hmmm.

https://docs.microsoft.com/en-us/win.../devcon-remove

"This operation does not delete the device driver or
any files installed for the device. After removing the
device from the device tree, the files remain and the
device is still represented internally as a nonpresent
device that can be reenumerated."

Dandy. Just dandy.

Paul
Ads