Launch Conditions - 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!

Arthur
Posts: 69
Joined: Wed May 19, 2010 9:53 am

Launch Conditions

Hi,

I'm trying to add a launch condition to my installer. I don't want it to run if the installer has already installed something on the PC.

I have tried using (Not Installed), but that doesn't work: I run the installer once, it installs correctly; I run the installer again, but I get the Modify/Repair/Remove dialogue box. This is not what I want - I want it to fail and give a message to the user that the previous installation needs to be uninstalled.

I tried a search looking for the installation folder, but that doesn't work either - I get the same Modify/Repair/Remove dialogue box. I'm using a search for the installer folder, and using the condition NOT search_result. Strangely, if I take away the NOT and manually create the installation folder, it won't install and shows the Launch Condition Description. It is finding the folder then.

I manually created the installation folder and ran the installer (with NOT search_result as the condition) but the installer didn't install and showed the Launch Condition Description, as I hoped. I then renamed the manually created installation folder (I appended an underscore), and ran the installer - it installs as I expect. The installation folder appears, next to the manually created one with only an underscore differentiating the names. I can't remove the underscore, as the files will then have the same names. Now when I run the installer, I get the Modify/Repair/Remove dialogue box again.

Help, this is driving me mad.

Arthur
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Launch Conditions

Hi Arthur,
This is not what I want - I want it to fail and give a message to the user that the previous installation needs to be uninstalled.
The behavior you are getting is the normal one. Since you already have a package installed, running the same package again will trigger its maintenance mode.
A previous installed version should be automatically uninstalled when the newer version is installed. Here is the article that describes this. This is the generic behavior of a major upgrade.

What you want it is not recommended. Can you please tell us the overall functionality you are trying to achieve so we can guide you in the right direction?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Arthur
Posts: 69
Joined: Wed May 19, 2010 9:53 am

Re: Launch Conditions

Hi, thanks for the reply. What I want is to automatically uninstall any version of the installer that is currently on the machine and then install. The page you have directed me to will do this, but only for previous versions. I haven't read the whole thing yet, but what I want to do is uninstall any version (previous, current, or later) that is currently installed.
Cheers, Arthur
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Launch Conditions

Hi Arthur,

Unfortunately this functionality is not possible. If you modify your .AIP and Run your installer from Advanced Installer and the uninstall will be done automatically.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”