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!

benjy
Posts: 37
Joined: Mon Nov 02, 2009 12:25 pm

Cancel install if previous version found

Hi,

I am working on a new version of our product, which is also getting a new Advanced Installer installer (I have a registered copy of the Enterprise Edition). This new installer needs to detect if a previous version, installed by an InstallShield installer, is present on the machine and exits if it is found; I don't want to do an upgrade as the user is asked various questions during the uninstall, so we need them to manually uninstall the previous version. So, I guess what I need to do is the following:
  • Do a search for the previous version (looking at the Uninstall key in the registry?)
  • Present the user with a suitable dialog if the previous version is found
  • Exit the installer
I've tried playing around with searches but these don't seem to be working as I expect (for example, when is the search actually performed?). I've also tried searching the forums and people have asked similar questions (http://www.advancedinstaller.com/forums ... ion#p42661) but I'm a bit stuck and would really appreciate some help!

Many thanks,

Ben
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Cancel install if previous version found

Hello Ben,

In order to achieve what you want you can use a custom launch condition which will check if the related package exists on target machine.

Here's the step to proceed:
- Go to "Search" page and add a new search (i.e. MY_SEARCH), using "New Search" context menu option, which will search for previous package version.
- Go to "Launch Conditions -> Custom" tab and add a new launch condition like this:
  • Condition: NOT (MY_SEARCH)
    Description: Desired description
- Build and run your project.
I've tried playing around with searches but these don't seem to be working as I expect (for example, when is the search actually performed?)
Please keep in mind that when your installation package is running with Full UI, searches from "Search" page are performed during "Wizard Dialogs Stage" -> "Searches" -> "AppSearch" standard action. If your installation package is running in silent mode, then searches from "Search" page are performed during "Install Execution Stage" -> "Searches" -> "AppSearch" standard action.

Let us know if this helps, otherwise please give us more details about your scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
benjy
Posts: 37
Joined: Mon Nov 02, 2009 12:25 pm

Re: Cancel install if previous version found

Hi,

Just to let you guys know that your solution worked very well, thank you.

Ben
natecope
Posts: 38
Joined: Tue Feb 03, 2015 4:27 pm

Re: Cancel install if previous version found

May I ask, what was your method of exiting the app?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Cancel install if previous version found

Hello,

I apologize for my delayed reply.
May I ask, what was your method of exiting the app?
The current installation will be canceled by the above launch condition. Can you please give us more details about your requirement so we can have a better understanding of what you need to achieve?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”