Hello,
I am trying to build an update installer that will replace single (or several) files on the target machines without uninstalling and reinstalling the whole application. For some reason this conceptually simple task seems hard to do with AI, but this may just be my inexperience with the product.
What you're describing would be a patch upgrade behavior. However, authoring patches is a very delicate process and requires careful settings not to mention keeping the patch rules.
Here's a thread that clarifies this. Also, please keep in mind authoring patches is available starting with Enterprise edition and project types.
One approach I am considering to make this easier is to write the APPDIR value to the registry in my initial installer. Is this a good idea and if so, what are the steps to write and read the folder location from the registry and use the value retreived in my update installer?
This implies you make that value persistent between versions, however in a patch scenario the old version doesn't get removed and all you would have to do is:
- set ver 1.0 to create the registry value in the
Registry page
- set ver 2.0 to add a search which retrieves that value from the
Search page
In case of a major upgrade you can follow
How do I prevent a file from being uninstalled or repaired? or use the "Persistent User Data" wizard from the Home tab. (FYI: we'll also improve this functionality in our next version)
Set string values for the Manufacturer and Product properties.
Here's "Product Information Properties" article with Windows Installer properties that store the information you need. These properties can be set from the
Product Details page.
Read the registry key (not sure which one) for [Manufacturer] and [Product] values.
This can be done from the Search page.
Display a message box showing "Application folder = " and the "Path" key value.
The
How do I display a message box? article can help.
Use the path key value to copy and replace files contained in the payload of the installer.
This can be done with
Text File Updates.
Display an error messagebox "Product not installed" if the registry key value returned null.
Search names are actually
public properties which are set only if the search is successful. You can use the search name as part of the message box condition.
All the best,
Mihai
FOLLOW US
Get the latest news in Application Packaging