Best practise to create an update install routine - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

projectmaster
Posts: 11
Joined: Wed Jan 06, 2010 12:56 pm

Best practise to create an update install routine

Hello,

We need a install programm which shows a dialog for configuration on firstinstall and can support ans update install process. Strictly spoken, the update install routine should keep the configuration concering several INI-files and have to recognize the folder of the first installed version. The msi musst notice wheater to make an update or a first install.

We tried out serveral stragies:

Upgrade Install: The uninstall before install removes the environment variables (necessary) therefore our batch scripts do not keep the configuration ini-Files (They copy the ini-File generated by AI in dependance of a certain environment variable). Furthermore due to sipping the config dialog the APPDIR is set on default value (programmfile/appname) and not on the directory of the firstinstall.

Side-by-Side Mode: Same Problem

Repair-mode: Dialog is conducted to maintance mode depending on existence of a certain env-variable (if version number increment), otherswise maintance dialog is started by default (no increment). Repair mode doesn´t replace files by default, just if they are deleted before update, they will be replaced.

Can you suggest an improvent for existing strategies or propose a new one.

Would be great if you could help.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Best practise to create an update install routine

Hello,

For preserving files when upgrading, you can check this thread:
http://www.advancedinstaller.com/forums ... 46&p=28245
You can adjust the above to preserve your ini files.
Furthermore due to sipping the config dialog the APPDIR is set on default value (programmfile/appname) and not on the directory of the firstinstall.
I am not sure what you mean by this. An automatic update will again prompt for an install directory, it will not use the previous one.
You could write APPDIR to the registry so that future versions of your installer know where the previous versions are and set their install location to those directories. You would basically use a custom action to set APPDIR to the value from the registry.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
projectmaster
Posts: 11
Joined: Wed Jan 06, 2010 12:56 pm

Re: Best practise to create an update install routine

I have made out that after persisting the INI-Files it is required to delete the whole application-directory, to force a file-substitution on maintance. Unfortunately an error occurs while deleting via custom action on uninstall. Therefore the approach doesn´t work.

With reference to the unclarity in my former post, I can say that you have understand my claim in the right way.
Concerning your suggestion, I tried out the following: http://www.advancedinstaller.com/user-g ... rties.html to persist the properties.

It is neccessary to preset the properties with the reg-search-property (property=[property]) on the InstallParameters page in AI causing that the text fields of the dialog show the property value ([Property]) if registry keys don´t exist. Unfortunately, that looks not very agile and furthermore we like to preset some value for users. Aditionally, it is only sucessful on firstinstall.

So do you have another idea or improvement ?
Attachments
dialog.JPG
dialog.JPG (2.49 KiB) Viewed 3479 times
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Best practise to create an update install routine

Hello,
I have made out that after persisting the INI-Files it is required to delete the whole application-directory, to force a file-substitution on maintance. Unfortunately an error occurs while deleting via custom action on uninstall. Therefore the approach doesn´t work.
I am not sure what you mean by this. Could you please explain in more detail?
It is neccessary to preset the properties with the reg-search-property (property=[property]) on the InstallParameters page in AI causing that the text fields of the dialog show the property value ([Property]) if registry keys don´t exist. Unfortunately, that looks not very agile and furthermore we like to preset some value for users. Aditionally, it is only sucessful on firstinstall.
You can not assign search result properties on the Install Parameters page. The instructions on the Install Parameters page are evaluated before the searches are done.
Instead use the Property Set with Formatted custom action to assign the properties resulted from the search.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
projectmaster
Posts: 11
Joined: Wed Jan 06, 2010 12:56 pm

Re: Best practise to create an update install routine

I mean the function of file-replacement / update in maintance mode. If I delete the application folder and I select the repair function of maintance the file will be replaced completely by the newer files. Therefore I have created a costum action processing the deletion.
Furthermore, there are serveral INI-Files which are protected with backup function from eleminiation.
Update function on maintance is partially necessary since version number isn´t always incremented.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Best practise to create an update install routine

Hello,

For updates without incrementing version, look into creating a patch.
You can keep the version number the same.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”