retry button if process is running during install - 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!

shelmers
Posts: 63
Joined: Thu Sep 03, 2009 9:02 pm
Location: Andover, Massachusetts USA

retry button if process is running during install

I don't want to install if a certain process is running. I've used the predefined custom action Detect Process and then added a custom launch condition to test AI_PROCESS_STATE="Stopped". This works fine, except that the user has no choice when a running process is running is detected -- they see the text of my launch condition message, then the install terminates.

However, uninstall seems to have a built in dialog that shows either of two conditions: 1) a running process or 2)files in use, and it offers a retry button. I like this approach much better because the user can resolve the problem and then allow the uninstall to continue.

I'm sure I could build my own dialog to offer a retry option, but is the built-in dialog available during install?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: retry button if process is running during install

Hi,

The "Files in use" dialog is a built in dialog. It is displayed by the InstallValidate standard action in the InstallExecuteSequence.
Windows Installer automatically shows it when a file that the application is trying to remove is used by the computer.

The easiest way for you would be to try using a custom action which will display a custom dialog for the user.

Another approach would be for you to force the predefined dialog to appear based on the value of AI_PROCESS_STATE using control events.
Also you will need to set its list, in which normally it stores the names of the files in use, to the name of your process. On our user guide you can find a tutorial that could help you to populate the listbox.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”