Yoster
Posts: 10
Joined: Mon Oct 04, 2010 5:39 pm

closing and restarting application during setup

Hi Everybody,

I am looking for a possibility to control closing and restarting the aplication (installed by ai) while modifying the application during runtime. To explain it closely: After starting my application, I want to offer the possibility via main menu to add or remove features. This process is started by a command a follows:

executeProg("msiexec.exe /i" + productCode + " FASTCUSTOMIZE=1");

The user now can add or remove feature in the "CustomizeDlg". From the moment on,the user presses the button "Install" within the "VerifyReadyDlg", the application itself must close to give access to files on harddisk (Database-files) to remove. After finishing the process of modification,the application should restart automatically.

Is this possible to realize and if so: How? I suppose it might work by using Custom Actions but can I realize it exactly?

Thank you for helping
Ragards
Yoster
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: closing and restarting application during setup

Hi Yoster,

A simple way to restart your application would be to close it when the modify process starts( InstallUISequence ) and to launch it again automatically when the setup process finishes.
Here are a couple of articles that could help you:
http://www.advancedinstaller.com/user-g ... pplication
http://www.advancedinstaller.com/user-g ... ation.html

You should also add execution conditions to both your close/start actions so they run only during maintenance. Their conditions should be:

Code: Select all

AI_MAINT
Best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”