Muhammad Rehan Saeed
Muhammad Rehan Saeed

Reputation: 38407

WIX Continues Uninstall After Failing To Close Application Causing Application to Crash

When closing my application it prompts users to save any unsaved information. When installing a new version of my application while it is running the following occurs:

  1. Start application.
  2. Install new version from WIX MSI.
  3. Application prompts to save unsaved information.
  4. WIX MSI ignores the fact the application is not closed and continues uninstalling the old version and installing the new version.
  5. The still running application crashes badly.

How can I get WIX to abandon the installation if the application does not close?

Upvotes: 1

Views: 635

Answers (1)

Vinoth
Vinoth

Reputation: 1995

As per my understanding, you want to stop the installation and inform customer to close the application if your application is running.

You can do this using custom action. Check your application is running or not using Process and create a property based on that in custom action.

Schedule the custom action after AppSearch or before Launch Condition in both InstallUI and InstallExecute (for silent installation) sequences. Check that property using condition element.

<Condition Message="Please close XXXX application to continue the installation." >APPLICATION_RUNNING</Condition>

Upvotes: 2

Related Questions