Detect a product , if exist stop installtion - 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!

bchetana
Posts: 95
Joined: Sat Dec 01, 2012 11:36 am

Detect a product , if exist stop installtion

Hi

We have a product biuld using visual studio set up project (example: P1VSsetup.exe). Now we are using Advanced Installer for creating the setup (example: AI.exe).

At the time of installation I want to detect P1VSsetup.exe and if it exist I want to show a message to user to uninstall it first and install the AI setup (AI.exe).

For this , I use .net installer class to detect VS.exe using registry or same code can be used in WIXCustom action so that it sets a installer propery value.

Now I want to show a message "Please uninstall P1VSsetup.exe before installing AI.exe" .

User clicks "ok" button and the installer should stop installation . How can I stop installtion ?

How can I do this?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Detect a product , if exist stop installtion

Hi,

In order to achieve this you can create a "Display error message" custom action with sequence, place it under "Path Resolution" in the "Wizard Dialog Stage" and in the "Execution Stage Condition" set the condition based on the property you created using ".Net installer class action" custom action.

For more details about WIX custom action you can read the How do I create fully fledged C# custom actions article.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”