Using ThinApp MSI's to Replace a Native App
Some time ago, I got to thinking about if it was possible to replace a natively installed application with a ThinApp packaged application by use of ThinApp's ability to create an MSI package.
After a couple of people recently ran this by me, I again started thinking about it and decided to test it out. And, as it turns out, my speculations were correct! It's totally possible!
Here's how to replace a native application with a ThinApp packaged app.
- Find the installer for the natively installed app.
- Capture the same app installer with ThinApp and make a ThinApp project (don't build yet).
- The ThinApp project's PACKAGE should contain the same MSI Product and Upgrade codes which the native app install has embedded into the Windows installed app database within the O.S.
NOTE: If it doesn't (you'll know when you run the MSI because it'll install/register the ThinApp'ed app without replacing the native), pull open the installer with an MSI editor (I used ORCA) and copy out the MSI Upgrade Code and MSI Product Code. Also, if you do need to pull open the MSI, you may need to extract out the MSI from the app's setup executable file by using command line switches so you can open it with your MSI Editor of choice. - Make the following changes within the ThinApp Project's PACKAGE.INI file:
- Find the native application's version number and change the MSIProductVersion value in the PACKAGE.INI file to something numerically higher in value.
- Change the ThinApp project's MSIProductCode in the PACKAGE.INI file to a valid GUID which is disimilar from the natively installed app's MSI Product Code.
NOTE: There are free GUID generators out on the Internet. - Ensure the MSIUpgradeCode within the project's PACKAGE.INI file is identical to the natively installed app's MSI Upgrade Code.
- Build the ThinApp Project!
NOTE: See "Customizing MSI Files with Package.INI" Parameters" in the ThinApp online documentation for additional assistance.
PACKAGE.INI MSI Parameters Example:
NOTE: Bolded lines below are the lines of interest which were changed for this procedure. Commented green sections are notes on lines changed, examples, and other notes.[BuildOptions] ;-------- MSI Parameters ---------- ;Enable MSIFilename if you want to generate a Windows Installer package. MSIFilename=Adobe Reader 9.1.msi MSIManufacturer=Adobe, Inc. ;OLD MSIProductVersion=1.0 ;NATIVE MSIProductVersion=9.1.0 MSIProductVersion=9.1.0001 MSIDefaultInstallAllUsers=1 MSIRequireElevatedPrivileges=1 MSIInstallDirectory=Adobe Reader 9.1 (VMware ThinApp) ;OLD MSIProductCode={AC76BA86-7AD7-1033-7B44-A91000000001} MSIProductCode={AC76BA86-7AD7-1033-7B44-A91000000013} ;Ensure MSIUpgradeCode is identical to Natively App's MSI Upgrade Code! MSIUpgradeCode={A6EADE66-0000-0000-484E-7E8A45000000} MSIUseCabs=1 MSICompressionType=Fast
To test, create a clean VM and install the native app (test the native app to ensure it works). Then take the ThinApp MSI and install it. What should happen is the ThinApp MSI should detect the natively installed "older" application, uninstall it, and replace it with the ThinApp version!
To see this in action, I created a short video showing a natively installed Adobe Reader 9.1 being replaced by a ThinApp'ed version of Adobe Reader 9.1 (seen below - click to view in separate page)!.
Comments