6
At MSDN it is stated that there are two techniques to install INF files on Windows XP or later:
- Programmatically through SetupCopyOEMInf function.
- Add an entry called CopyInf on an INF section.
Are there an equivalent entry on an inf section to uninstall inf files that is similar to SetupUninstallOEMInf function?
I found this solution using SetupUninstallOEMInf but it does not seems suitable to me.
1I've yet to see a driver installation
.inf
(unlike.inf
s that install some system components) that has an uninstallation section. So these commands are utterly useless. – ivan_pozdeev – 2017-12-31T13:24:46.997Right, but I didn't find any entry that explicitly remove oemXX.inf generated by CopyInf entry. I am able to remove *.sys files that was copied to %SystemRoot%\System32\drivers with CopyFiles entry. There is Delfiles entry but only works when I know which files I need to remove. – coelhudo – 2012-07-26T21:29:10.933
Are you asking about
oem*.inf
being automatically removed from\Windows\INF
? I have never seen that happen, especially with things that are installed via.inf
files instead of.exe
or.msi
installers. You could open them in a text-editor and delete the one(s) that no longer apply. – Synetech – 2012-07-26T21:33:16.577Yeap, I need this to be integrated into a NSIS (the installer from nullsoft) script. It has to be executed automatically when my app is uninstalled. – coelhudo – 2012-07-26T21:47:21.957
Ah, I see. Well if you are writing your own (un)installer, then just add a line to delete the
.inf
file. You can query theInfPath
value of the device in question under theHKLM\SYSTEM\ControlSet001\Control\Class
registry branch to find out what theoem*.inf
filename is for it. – Synetech – 2012-07-27T00:22:58.173I didn't find anything similar to the oem*.inf in that registry branch (windows xp and windows 7) tat was generated while installing. Is there any other place where I can find the corresponding oem name? – coelhudo – 2012-07-27T20:57:43.897
1Are you sure the device was installed? Are you sure there is an
oem*.inf
file? Do a search in\Windows\inf\
foroem*.inf
files taht contain the device name (or just check them all in notepad if there’s only a few). – Synetech – 2012-07-27T22:11:31.467