shelmers
Posts: 63
Joined: Thu Sep 03, 2009 9:02 pm
Location: Andover, Massachusetts USA

stop install if app bitness is wrong

Tue Aug 31, 2021 4:59 pm

Thanks to several helpful threads here I know how to determine the bitness of an Office app, which I need to do prior to installing my add-in.

However, unlike @Catalin's excellent tutorial and sample installer, I don't have a mixed bitness install. Instead, if the bitness is wrong I want to halt the installation altogether. And I want that to be the very first check.

I've created the appropriate searches to determine bitness and set up a custom launch condition, but I know I can't control the execution sequence of launch conditions.

How do I run the searches, halt the installation, and issue and an appropriate error message if the bitness is wrong?

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

Re: stop install if app bitness is wrong

Fri Sep 03, 2021 2:07 pm

Hello Scott,

If you do not want to use the custom "Launch Conditions" approach, perhaps we could proceed as it follows:

- have the search that determines if the bitness is correct or not

- in the "Custom Actions" page, create a "Display error message" custom action that will be executed right after the "Searches" action group

- condition the execution of this custom action based on the result of your search

Hope this helps! :)

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

shelmers
Posts: 63
Joined: Thu Sep 03, 2009 9:02 pm
Location: Andover, Massachusetts USA

Re: stop install if app bitness is wrong

Tue Sep 07, 2021 5:18 pm

@Catalin: I would have liked to use custom Launch Conditions but, unless I'm mistaken, I can't control the sequence of execution, which means I can't guarantee that the bitness check will be first. If that's not correct, please let me know.

Regardless, I tried your suggestion and it works fine. The search for the 64-bit reg entry returns 1 if found and null if not; then in the display error message custom action I test for =1 or <>1 as required for the appropriate bitness.

thanks

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

Re: stop install if app bitness is wrong

Mon Sep 13, 2021 12:44 pm

Hello Scott,
@Catalin: I would have liked to use custom Launch Conditions but, unless I'm mistaken, I can't control the sequence of execution, which means I can't guarantee that the bitness check will be first. If that's not correct, please let me know.
You are indeed right about this, the order of Launch Conditions can not be predicted.

Regarding the solution I have offered, I am glad to hear it works as expected.

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

Return to “Building Installers”