Frode
Posts: 34
Joined: Thu Feb 26, 2009 3:11 pm

Automatic repair after upgrade

Hi,
I am working with an 'Install new version first and then uninstall old version' installer where I have to do some serious "refactoring" of some Components. In this Components I have located several files with a shared key, and the file "holding" the key must be deleted. This in turn leads to several necessary files being deleted on the uninstall step.

The only way to solve this, as I see it, is to do an upgrade - then a repair.
If I could turn on automatic repair after the upgrade that would be nice.

Any suggestions?
Daniel
Posts: 8276
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Automatic repair after upgrade

Hello,

In order to achieve this you can create your own BAT file which will launch your installation package in Repair mode using a command line like this:

Code: Select all

msiexec.exe /fa <product_code>
Please take a look on our "Command Line" article.

Also, you can run the related BAT file using a "Launch file or open URL" custom action with sequence scheduled on "Finish Dilogs Stage".

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Frode
Posts: 34
Joined: Thu Feb 26, 2009 3:11 pm

Re: Automatic repair after upgrade

Thank you - I will give it a try :)
Frode
Posts: 34
Joined: Thu Feb 26, 2009 3:11 pm

Re: Automatic repair after upgrade

It worked, although AI 10.2 caused some problems. After some stumbling about how to use the File To Launch and Command Line properties I ended up with an invalid entry in the projectfile.

Something like
<ROW Action="LaunchFile" Type="2" Source="viewer.exe" Target="<target file>"[#repair.bat]"" Options="2"/>
at the same time the GUI just showed
"[#repair.bat]"
in the File To Launch property

Return to “Building Installers”