Partilhar via


Windows Installer 4.0 - MSI that installs data files under System Protected folders does not remove files upon uninstall.

Installing data files (.mdb) into System Protected folders (Program Files, System32 etc..) on Windows Vista machines as Standard user.

Upon uninstall the data files appear to be removed, however when a new version of the application is installed the older data files are still referenced by the application.

 

Due to file virtualization on Vista, when an application is launched as a standard user and if the application needs to write files into protected folders such as ProgramFiles it creates a VirtualStore under the Users Appdata folder.

The Virtual Store is not removed upon uninstallation of the application. This is by design.

The recommendation is to not write data files into ProgramFiles folder.

 

Please see More information section to read more about UAC dev requirements and File virtualization on Vista.

 

Resolution

* Do not use System Protected folders to install Data Files.

* [CommonAppDataFolder] may be used for such reasons.

 

CommonAppDataFolder resolves to the following locations on XP and Vista respectively.

<Root Drive>\Documents and Settings\All Users\Application Data

<Root Drive>\Program Data

 

More Information

New UAC Technologies for Windows Vista - https://msdn2.microsoft.com/en-us/library/bb756960.aspx

The Windows Vista UAC Dev Requirements document may be downloaded from - https://download.microsoft.com/download/5/6/a/56a0ed11-e073-42f9-932b-38acd478f46d/WindowsVistaUACDevReqs.doc

 

 

Contributor : Ravi Shankar