truejegor
Posts: 7
Joined: Thu Sep 16, 2021 9:49 am

Delete .exe install

Thu Sep 16, 2021 9:54 am

Hi.
I ran into a problem like this:
I am doing a msi installation in an adventurous installer. I wrote a script that checks if the exe version of my application is installed and if it is installed, then it starts uninstalling it. I made this script work at the beginning of the installation of the msi package. Now I want to make it so that if the script works, then the installation completion dialog would be shown. And if there is no exe package, then the script would not work. But at the moment, the script always fires and always displays a completion dialog, regardless of what choice was made in the script.
The script was written in vbs.
Thank you in advance!

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: Delete .exe install

Thu Sep 16, 2021 2:42 pm

Hello and welcome to our forums,
And if there is no exe package, then the script would not work. But at the moment, the script always fires and always displays a completion dialog, regardless of what choice was made in the script.
Here, we will need to condition the execution of the script. To do so, you could either:

- create a "Search" that detects if your product is already installed

- create another script that checks if your product is already installed. In this script, we should set an installer property and then condition the execution of the next custom action using that installer property, e.g.:

if the setup is already installed --> set the ALREADY_INSTALLED property to "Yes" --> condition the execution of the next custom action as it follows:

Code: Select all

ALREADY_INSTALLED = "Yes"
Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

truejegor
Posts: 7
Joined: Thu Sep 16, 2021 9:49 am

Re: Delete .exe install

Fri Sep 17, 2021 9:12 am

Ty for answer, Catalin.

I did exactly what you said, but I still have the same problem. I want to call the finish dialog through the VBS if the condition is triggered that the previous version of the program is already installed. help me please
I have the same problem as this person. But I never found an understandable solution.
viewtopic.php?t=8174
Last edited by truejegor on Fri Sep 17, 2021 9:14 am, edited 2 times in total.

truejegor
Posts: 7
Joined: Thu Sep 16, 2021 9:49 am

Re: Delete .exe install

Fri Sep 17, 2021 9:13 am

thank you in advance

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: Delete .exe install

Fri Sep 17, 2021 6:05 pm

Hello,

That message is usually displayed when two products having the same ProductCode are installed on the same machine.

Please have a look over the following forum thread which discusses the same issue:

Another version of this product is already installed (EXE file)

Basically, you need to make sure that:

- the second product has a higher version (e.g. if the first one has version 1.0.0, the second one should have version 1.0.1 or higher)

the "ProductCode" property has been changed between the two

You can read more about the "ProductCode" property in the following article:

Product Identification (ProductCode and UpgradeCode)

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”