Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Monthly Seminars at OSR Headquarters

East Coast USA
Windows Internals and SW Drivers, Dulles (Sterling) VA, 9 April 2018

Writing WDF Drivers I: Core Concepts, Manchester, NH, 7 May 2018

Kernel Debugging & Crash Analysis for Windows, Manchester, NH, 21 May 2018


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 4  
06 Apr 18 11:13
adnan
xxxxxx@gmail.com
Join Date: 24 May 2013
Posts To This List: 25
co-installer uninstall issue

Hi all, while trying to uninstall a driver. In co-installer, if I use `InstallHinfSectionW(NULL, NULL, "DefaultUninstall 132 c:\drivers\driver.inf, 0);` it removes the file from C:\windows\system32\drivers but if I use `SetupInstallFilesFromInfSection(inf, NULL, FileQueue, "DefaultUninstall", NULL, 0);` doesn't return any error, but doesn't delete the file C:\windows\system32\drivers\driver.sys INF file `[DefaultUninstall] DelFiles = DriversDir DelReg = Driver.DelRegistry [DriversDir] driver.sys [Driver.DelRegistry] HKLM,%drvRegistry%,%drvDebugFlags%`
  Message 2 of 4  
06 Apr 18 12:21
Doron Holan
xxxxxx@microsoft.com
Join Date: 08 Sep 2005
Posts To This List: 10195
co-installer uninstall issue

How can you have a coinstaller with a default install (not pnp) inf? What does setupapi.dev.log say? Bent from my phone ________________________________ From: xxxxx@lists.osr.com <xxxxx@lists.osr.com> on behalf of xxxxx@gmail.com <xxxxx@lists.osr.com> Sent: Friday, April 6, 2018 8:13:20 AM To: Windows System Software Devs Interest List Subject: [ntdev] co-installer uninstall issue Hi all, while trying to uninstall a driver. In co-installer, if I use `InstallHinfSectionW(NULL, NULL, "DefaultUninstall 132 c:\drivers\driver.inf, 0);` it removes the file from C:\windows\system32\drivers but if I use `SetupInstallFilesFromInfSection(inf, NULL, FileQueue, "DefaultUninstall", NULL, 0);` doesn't return any error, but doesn't delete the file C:\windows\system32\drivers\driver.sys INF file `[DefaultUninstall] DelFiles = DriversDir DelReg = Driver.DelRegistry [DriversDir] driver.sys [Driver.DelRegistry] HKLM,%drvRegistry%,%drvDebugFlags%` --- NTDEV is sponsored by OSR Visit the list online at: <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.co m%2Fshowlists.cfm%3Flist%3Dntdev&data=02%7C01%7CDoron.Holan%40microsoft.com%7Cf0b b82ea215940feb43d08d59bd115ab%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636586 244664498152&sdata=adTJMmEnc6THMVlHLG9Y%2FZvGeOpCuBP2hH3NSM%2B9BDc%3D&reserved=0> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers! Details at <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osr.com%2Fse minars&data=02%7C01%7CDoron.Holan%40microsoft.com%7Cf0bb82ea215940feb43d08d59bd11 5ab%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636586244664498152&sdata=KnfDU23 IWD%2Bfufi8a0UjlbUVHm9fs1MQDbK2ycl8hG8%3D&reserved=0> To unsubscribe, visit the List Server section of OSR Online at <https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.osronline.co m%2Fpage.cfm%3Fname%3DListServer&data=02%7C01%7CDoron.Holan%40microsoft.com%7Cf0b b82ea215940feb43d08d59bd115ab%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636586 244664498152&sdata=LkQh5M7rXpIwBUuAZgPgI27dueUWHZSTS%2Fas9DJCzos%3D&reserved=0> --
  Message 3 of 4  
06 Apr 18 12:57
Tim Roberts
xxxxxx@probo.com
Join Date: 28 Jan 2005
Posts To This List: 11894
co-installer uninstall issue

xxxxx@gmail.com wrote: > Hi all, > while trying to uninstall a driver. > > In co-installer, if I use > `InstallHinfSectionW(NULL, NULL, "DefaultUninstall 132 c:\drivers\driver.inf, 0);` it removes the file from C:\windows\system32\drivers > but if I use > `SetupInstallFilesFromInfSection(inf, NULL, FileQueue, "DefaultUninstall", NULL, 0);` > doesn't return any error, but doesn't delete the file C:\windows\system32\drivers\driver.sys That just queues up actions that need to be taken.  In order to take the actions, you have to call SetupInstallFromInfSection.  Are you calling that? Microsoft's official policy is to discourage deleting driver files and registry entries, to make it easier should the device ever appear again.  As developers, we like to have a way to restore a system to pristine cleanliness, but that's contrary to the philosophy. -- Tim Roberts, xxxxx@probo.com Providenza & Boekelheide, Inc.
  Message 4 of 4  
09 Apr 18 09:39
adnan
xxxxxx@gmail.com
Join Date: 24 May 2013
Posts To This List: 25
co-installer uninstall issue

I am calling `if (!SetupInstallFromInfSection( NULL, hInf, L"DefaultUninstall", SPINST_FILES, NULL, NULL, 0, NULL, NULL, NULL, NULL ))` But no error from it. setup.dev.log does show the driver has been removed via 'SetupDiRemoveDevice', the driver is removed from the driverStore. The driver service is removed via `SetupInstallServicesFromInfSection` and then inf file is deleted `SetupUninstallOEMInf` I am removing the device via `SetupDiRemoveDevice`, works fine then removing the services via `SetupInstallServicesFromInfSection(hInf, L"DefaultUninstall.Services", 0))`, works fine then removing the files via `SetupInstallFilesFromInfSection + SetupCommitFileQueue + SetupInstallFromInfSection` doesn't work. The driver file is still available in `C:\windows\system32\drivers\` then removing the inf file via `SetupUninstallOEMInf` works fine.
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 08:20.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license