Prev: Driver Verfier issue with WDM driver on Windows 7
Next: HOW TO: Issue a USB plug-and-play rescan
From: JY on 31 Mar 2010 04:09 Hi Tim, Please see my comments below. Thanks, Jy "Tim Roberts" wrote: > > > >I see that the inf file gets copied to the Windows\inf folder on pre-install > >and they get removed from there on uninstalling. But the .sys file remains in > >the system32\drivers folder after uninstalling the driver. How do I remove > >the .sys file from there? > > Are you setting DRIVER_PACKAGE_DELETE_FILES? That works until you get to > Windows 7. In Windows 7, you don't delete the binaries. > > DevCon uses SetupDiCallClassInstaller with DIF_REMOVE to do its "remove" > function, and SetupUninstallOEMInf to delete the driver package. Yes, I had not been setting DRIVER_PACKAGE_DELETE_FILES, I checked MSDN again after posting, and used it, so now it gets removed. Do you mean that the binaries should remain on Windows 7? In that case the driver is not uninstalled properly, isn't it? Is it OK to use some kind of file searching and go and remove it from there? > >Since the .sys file is not removed, the USBDeview tool shows that the driver > >is still installed. > ....because... > >I also see that the registry entries > >HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB (on XP) > >are not removed by DriverPackageUninstall. How do I remove these too? > > You don't. Those keys belong to device manager. It wants to remember you. > -- But then the USBDeview tool shows that the driver still exists on the system. And in this tool, if I select a particular entry and say "Uninstall selected devices" the registry entry gets removed. So, shouldn't my application do the same?
From: Mike [MSFT] on 1 Apr 2010 21:15 Tim mentioned DevCon, but it doesn't sound like you are using DevCon, correct? It sounds like you are just uninstalling the driver package and not the device node itself. I believe DIFxAPI doesn't have support for uninstalling device nodes, you'll want to use DevCon (or copy the source from DevCon). -Mike "JY" <sd(a)nospamgroup.com> wrote in message news:B14A91F7-7DB4-4A9F-8E51-1C73024CA973(a)microsoft.com... > Hi Tim, > > Please see my comments below. > > Thanks, > Jy > > "Tim Roberts" wrote: > >> > >> >I see that the inf file gets copied to the Windows\inf folder on >> >pre-install >> >and they get removed from there on uninstalling. But the .sys file >> >remains in >> >the system32\drivers folder after uninstalling the driver. How do I >> >remove >> >the .sys file from there? >> >> Are you setting DRIVER_PACKAGE_DELETE_FILES? That works until you get to >> Windows 7. In Windows 7, you don't delete the binaries. >> >> DevCon uses SetupDiCallClassInstaller with DIF_REMOVE to do its "remove" >> function, and SetupUninstallOEMInf to delete the driver package. > > Yes, I had not been setting DRIVER_PACKAGE_DELETE_FILES, I checked MSDN > again after posting, and used it, so now it gets removed. > > Do you mean that the binaries should remain on Windows 7? In that case the > driver is not uninstalled properly, isn't it? Is it OK to use some kind of > file searching and go and remove it from there? > >> >Since the .sys file is not removed, the USBDeview tool shows that the >> >driver >> >is still installed. >> ....because... >> >I also see that the registry entries >> >HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB (on XP) >> >are not removed by DriverPackageUninstall. How do I remove these too? >> >> You don't. Those keys belong to device manager. It wants to remember >> you. >> -- > > But then the USBDeview tool shows that the driver still exists on the > system. And in this tool, if I select a particular entry and say > "Uninstall > selected devices" the registry entry gets removed. So, shouldn't my > application do the same?
From: JY on 5 Apr 2010 04:03 "Mike [MSFT]" wrote: > Tim mentioned DevCon, but it doesn't sound like you are using DevCon, > correct? It sounds like you are just uninstalling the driver package and > not the device node itself. I believe DIFxAPI doesn't have support for > uninstalling device nodes, you'll want to use DevCon (or copy the source > from DevCon). > > -Mike > Yes, I'm not using DevCon, I'll check it out. - Jy
|
Pages: 1 Prev: Driver Verfier issue with WDM driver on Windows 7 Next: HOW TO: Issue a USB plug-and-play rescan |