oz85
Posts: 5
Joined: Fri Oct 27, 2023 7:55 am

Install attached file (exe) only if not already installed

Hello to everyone!

I searched for this topic but i didn't find out a solution. I'm a noob about advanced installer so i'm sorry for some stupid question!

I'm building a installer with a simple exe file and some custom actions based on power shell command (copy a file from a location to another and another one who create an ODBC connection). For using the ODBC connection i need a specific driver that i want to install by the main installation built with advanced installer.

The main problem is that for every version the system call the installation while i want to call this procedure only if the software is not already installed. If anyone exit the installation of driver i want to quit all the main installation.

Sorry for my english! hope someone got my point! attached some file.

Thanks!
Attachments
2024-03-25 20_13_28-.png
2024-03-25 20_13_28-.png (79.76 KiB) Viewed 15465 times
Catalin
Posts: 6727
Joined: Wed Jun 13, 2018 7:49 am

Re: Install attached file (exe) only if not already installed

Hello,

If the EXE that you are trying to launch through a custom action is an actual installer, I would advise adding it as a prerequisite in the "Prerequisites" page.

In that page, you can define the installation conditions so that the prerequisite (the ODBC driver) is only installed if it's not already installed. More information about this topic can be found here: Prerequisite install detection criteria - How to create one.

Regarding the main setup failing if the prerequisite is not installed, you can achieve this by unchecking the "Continue with the main installation even if the prerequisite is not installed" option from the "Installation" tab.
Screenshot_129.png
Screenshot_129.png (16.54 KiB) Viewed 14317 times

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
oz85
Posts: 5
Joined: Fri Oct 27, 2023 7:55 am

Re: Install attached file (exe) only if not already installed

Thank you for the quick response!

I tried to set a Prerequisites but at a point i need to set how to install that driver. My idea is to install the driver as attachment without go to any website o to network path. But this installing need to be active only if this file is not exist.
Catalin wrote: Tue Mar 26, 2024 1:15 pm Hello,

If the EXE that you are trying to launch through a custom action is an actual installer, I would advise adding it as a prerequisite in the "Prerequisites" page.

In that page, you can define the installation conditions so that the prerequisite (the ODBC driver) is only installed if it's not already installed. More information about this topic can be found here: Prerequisite install detection criteria - How to create one.

Regarding the main setup failing if the prerequisite is not installed, you can achieve this by unchecking the "Continue with the main installation even if the prerequisite is not installed" option from the "Installation" tab.

Screenshot_129.png


Hope this helps!

Best regards,
Catalin
Attachments
3.jpg
3.jpg (23.8 KiB) Viewed 14277 times
2.jpg
2.jpg (36.43 KiB) Viewed 14277 times
1.jpg
1.jpg (19.43 KiB) Viewed 14277 times
oz85
Posts: 5
Joined: Fri Oct 27, 2023 7:55 am

Re: Install attached file (exe) only if not already installed

Ok i tried to set a prerequisite but i found two things while i try to install:

1. I have a new button with a custom insallation while i need just a one (wihtout custom)
2. even i click to typical installation it runs the driver exe even i already installed


Catalin wrote: Tue Mar 26, 2024 1:15 pm Hello,

If the EXE that you are trying to launch through a custom action is an actual installer, I would advise adding it as a prerequisite in the "Prerequisites" page.

In that page, you can define the installation conditions so that the prerequisite (the ODBC driver) is only installed if it's not already installed. More information about this topic can be found here: Prerequisite install detection criteria - How to create one.

Regarding the main setup failing if the prerequisite is not installed, you can achieve this by unchecking the "Continue with the main installation even if the prerequisite is not installed" option from the "Installation" tab.

Screenshot_129.png


Hope this helps!

Best regards,
Catalin
Attachments
3.jpg
3.jpg (90.12 KiB) Viewed 14270 times
2.jpg
2.jpg (76.78 KiB) Viewed 14270 times
1.jpg
1.jpg (100.77 KiB) Viewed 14270 times
oz85
Posts: 5
Joined: Fri Oct 27, 2023 7:55 am

Re: Install attached file (exe) only if not already installed

oz85 wrote: Tue Mar 26, 2024 2:05 pm Ok i tried to set a prerequisite but i found two things while i try to install:

1. I have a new button with a custom insallation while i need just a one (wihtout custom)
2. even i click to typical installation it runs the driver exe even i already installed


Catalin wrote: Tue Mar 26, 2024 1:15 pm Hello,

If the EXE that you are trying to launch through a custom action is an actual installer, I would advise adding it as a prerequisite in the "Prerequisites" page.

In that page, you can define the installation conditions so that the prerequisite (the ODBC driver) is only installed if it's not already installed. More information about this topic can be found here: Prerequisite install detection criteria - How to create one.

Regarding the main setup failing if the prerequisite is not installed, you can achieve this by unchecking the "Continue with the main installation even if the prerequisite is not installed" option from the "Installation" tab.

Screenshot_129.png


Hope this helps!

Best regards,
Catalin
Attachments
5.jpg
5.jpg (59.93 KiB) Viewed 14269 times
4.jpg
4.jpg (29.18 KiB) Viewed 14269 times
Catalin
Posts: 6727
Joined: Wed Jun 13, 2018 7:49 am

Re: Install attached file (exe) only if not already installed

Hello,

From what I can see, you are trying to look in the 64-bit version of the Program Files folder.

By default, this search will be redirected to Program Files (x86) if your setup is of 32-bit (you can check this in the "Install Parameters" page).

That being said, please make sure the search is marked as "64-bit" in the "Prerequisites" page --> "Condition" tab.
Screenshot_131.png
Screenshot_131.png (16.61 KiB) Viewed 11326 times
Hope this helps!

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

Return to “Building Installers”