sbaird
Posts: 57
Joined: Tue Sep 01, 2015 2:08 pm

Post-install cleanup steps not happening when using Enhanced UI

I've discovered that during an uninstall operation when using Enhanced UI, there are standard MSI steps at the end of the process that are not happening. When a file is scheduled for deletion during the uninstall, it should be deleted at the end of the MSI process. When not using Enhanced UI, the standard MSI behavior happens and the files are properly deleted. However, when using Enhanced UI, the "post-install cleanup" step at the end never happens, and the files are left behind. This means that the cached MSI and icon files in "C:\Windows\Installer\{GUID}" are not removed. This may not seem like a problem, but because the pending deletes remain on these files (even if they are reinstalled), it is a problem. A future MSI operation will trigger the cleanup. Consider this scenario (this is how we discovered the problem):

1. Install Product A
2. Uninstall Product A
3. Install Product A again (now the deletes on the icon files are still pending, even though the same files have been "installed" again).
4. Install Product B

After installing Product B, the icon files from Product A are deleted during the "post-install cleanup" stage at the end of Product B's installation. Since Product A uses Enhanced UI, this cleanup doesn't happen during steps 2 or 3 above.

Just to be clear, I am talking about MSI log entries like the following (during uninstall):

Code: Select all

MSI (s) (50:00) [08:43:31:798]: Scheduling file 'C:\Windows\Installer\10e979.msi' for deletion during post-install cleanup (not post-reboot).
MSI (s) (50:00) [08:43:31:814]: Scheduling file 'C:\Windows\Installer\{96B8F117-2338-4ED8-B124-AEEF1CEFAF86}\ext_1.exe' for deletion during post-install cleanup (not post-reboot).
MSI (s) (50:00) [08:43:31:814]: Executing op: IconRemove(Icon=ext.exe,)
Without Enhanced UI turned on, you will see this near the end of the log:

Code: Select all

MSI (c) (B8:1C) [10:03:53:751]: Product: Product A -- Configuration completed successfully.

MSI (c) (B8:1C) [10:03:53:751]: Windows Installer reconfigured the product. Product Name: Product A. Product Version: 4.0.1.1. Product Language: 1033. Manufacturer: Company, Inc.. Reconfiguration success or error status: 0.

MSI (c) (B8:1C) [10:03:53:751]: Cleaning up uninstalled install packages, if any exist
When uninstalling silently, you will see this (note the "post-install cleanup" steps):

Code: Select all

MSI (s) (A4:0C) [10:12:51:299]: Product: Product A -- Removal completed successfully.

MSI (s) (A4:0C) [10:12:51:315]: Windows Installer removed the product. Product Name: Product A. Product Version: 4.0.1.1. Product Language: 1033. Manufacturer: Company, Inc.. Removal success or error status: 0.

MSI (s) (A4:0C) [10:12:51:315]: Deferring clean up of packages/files, if any exist
MSI (s) (A4:0C) [10:12:51:315]: MainEngineThread is returning 0
MSI (s) (A4:70) [10:12:51:315]: RESTART MANAGER: Session closed.
MSI (s) (A4:70) [10:12:51:315]: No System Restore sequence number for this installation.
=== Logging stopped: 8/1/2016  10:12:51 ===
MSI (s) (A4:70) [10:12:51:315]: User policy value 'DisableRollback' is 0
MSI (s) (A4:70) [10:12:51:315]: Machine policy value 'DisableRollback' is 0
MSI (s) (A4:70) [10:12:51:315]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (A4:70) [10:12:51:315]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (A4:70) [10:12:51:315]: Note: 1: 2265 2:  3: -2147287035 
MSI (s) (A4:70) [10:12:51:315]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2 
MSI (s) (A4:70) [10:12:51:315]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied.  Counter after decrement: -1
MSI (s) (A4:70) [10:12:51:315]: Post-install cleanup: removing installer file 'C:\Windows\Installer\21a0b6.msi'
MSI (s) (A4:70) [10:12:51:330]: Post-install cleanup: removing installer file 'C:\Windows\Installer\{96B8F117-2338-4ED8-B124-AEEF1CEFAF86}\ext_1.exe'
MSI (s) (A4:70) [10:12:51:330]: Post-install cleanup: removing installer folder 'C:\Windows\Installer\{96B8F117-2338-4ED8-B124-AEEF1CEFAF86}\' (if empty)
None of the above happens when Enhanced UI is turned on. Also, the usual client-side dump of properties doesn't happen (entries like Property(C): ...). This can't be a good thing.

I hope this is all clear. Let me know if you need any further information.
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Post-install cleanup steps not happening when using Enhanced UI

Hello,

Indeed, this is a limitation imposed by our "Enhanced User Interface" feature. We are aware of this behavior and this can be avoided by simply adding the "AiClearTemp" property in the "Install Parameters" page of your project. Just go to "Install Parameters" and add the "AiClearTemp" property with a value of "1".

However, please note that even when using the "AiClearTemp" property workaround, when uninstalling the product from Control Panel the cached MSI still persists on the system until the next product installation. This is a limitation imposed by our EUI feature and we cannot fix it. Thank you for your understanding.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”