cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Basic MSI Project: Uninstall Does Not Remove the Device Driver Folder

Basic MSI Project: Uninstall Does Not Remove the Device Driver Folder

Summary:
The driver package from the driver store is not removed during uninstall.

Synopsis:
This article will provide steps for removing the driver package from the driver store during uninstall.

Discussion:

1. Set Permanent to No for the component to which the driver is associated. If Yes is selected, none of the component's data (such as files, registry entries, and shortcuts) are removed from the target system when the component's parent feature is uninstalled. As the name Permanent indicates, a component marked Permanent is permanent, meaning that it is not removed during uninstall.
2. For the component that contains the file or folder, right-click the file and click Add Removal. Make sure there is an entry created in the Direct Editor in the RemoveFile MSI Table.
3. Change the General Information > Template Summary to "x64;1033" (the value for a 64-bit installer).
4. On a 64-bit machine, [System64Folder] needs to be used to target the C:\Windows\System32 folder, because this is the 64-bit location. The C:\Windows\SysWOW64 folder is the 32-bit location for the System folder.

Example:

1. Create a Basic MSI Project.
2. Add a feature and a component.
3. Set General Information > Template Summary to "x64;1033".
4. Go to the Property Manager and create a new property named "XXXXBUS" with a value of "C:\Windows\System32\xxxxbus".
5. Go to the RemoveFile MSI Table and add the following values: FileKey = Removexxxxbus, Component = xxxbus, FileName = xxxxbus.inf, DirProperty = XXXXBUS, InstallMode=3
6. Build the project.
7. Run the installer.
8. Go to the target machine and create the following folder: C:\Windows\System32\xxxxbus
9. Make sure that the xxxxbus.inf file is in the C:\Windows\System32\xxxxbus folder.
10. Run the installer on the target machine.
11. Run the uninstaller on the target machine.

During uninstall the driver package will be removed from driver store at the following location:

C:\Windows\System32\DriverStore\FileRepository

Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Aug 25, 2022 11:24 AM
Updated by: