DetectProcess with Prerequisite - Advanced Installer Community
m4a.c4
Posts: 24
Joined: Mon Mar 30, 2020 9:25 pm

DetectProcess with Prerequisite

Hi there,

We are currently using Advanced Installer to install an Excel Add-in.

When installing, we require Excel to be closed before. Previously, this was working via Custom Actions.

As part of our business process, we have added a prerequisite to install another piece of software required for our Add-in. With the prerequisite configured, I have been unable to get the DetectProcess Custom Action to work as expected.

Is there a way that I can detect if Excel is Open before the Prerequisite wizard runs and stop the installer?

Any help would be appreciated!
Thanks,
Connor
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: DetectProcess with Prerequisite

Hi Connor and welcome to our forums,

Just tested this and our "Detect Process" custom action works fine. Could you please make sure you type in "Process name" field of your custom action the full process name (and without being enclosed between quotes).

To check an application the full process name I would recommend you to open Task Manager and go to "Details" tab. Just copy the name under "Name" column.
screen.jpg
screen.jpg (70.61 KiB) Viewed 7746 times
All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
m4a.c4
Posts: 24
Joined: Mon Mar 30, 2020 9:25 pm

Re: DetectProcess with Prerequisite

Hi Daniel,

Thanks for your reply. I have tested this and locally it seems to be working as expected.

We are using Advanced Installer and the Executable is getting generated as part of our Devops pipeline.

When using the executable from the Devops Pipeline, the Launch Condition (NOT AI_PROCESS_STATE = "Running") does not appear to work as the Prerequisite installer runs with Excel being open.

I have emailed my AIP file through to support at advanced installer dot com.
Note: Because we are using this in a Devops Pipeline, there are a lot of replacements.

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

Re: DetectProcess with Prerequisite

Hi Connor,

This may happen during a silent installation. Please note that during a silent install only the "Install Execution Stage" custom action are executed. All actions from "Wizard Dialogs Stage" are skipped.

From what I see into your project you added your detect process custom action only in "Wizard Dialog Stage", therefore this action won't be executed during a silent or basic UI install.

Could you please proceed like this:

1. go to "Custom Actions" page and select your detect process custom action
2. while keeping the [SHIFT] key pressed drag and drop your custom action entry under "Install Execution Stage" just before "Searches" action group

This way your custom action will ne shared betweenthe two execution stages and thus executed during a silent install too.

Let me know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
m4a.c4
Posts: 24
Joined: Mon Mar 30, 2020 9:25 pm

Re: DetectProcess with Prerequisite

Hi Daniel,

I have made the changes you suggested and it still did not appear to work.

I have sent my AIP file through to support at advanced installer dot com with the changes you suggested.

Thanks,
Connor
m4a.c4
Posts: 24
Joined: Mon Mar 30, 2020 9:25 pm

Re: DetectProcess with Prerequisite

Also to follow up,

We are not doing a silent install, just a UI Install.

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

Re: DetectProcess with Prerequisite

Hi Connor,

I have further investigated this with my dev team and unfortunately this happens because our "Check launch conditions before searching for prerequisites" option does not have support to execute the "Detect Process" predefined custom action that is a dependency of your custom launch condition.

This is a limitation of Advanced Installer and we will try to improve it in a future version of our product. Until then I sent you over email a modified version of your setup project that should work for you in this case.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
m4a.c4
Posts: 24
Joined: Mon Mar 30, 2020 9:25 pm

Re: DetectProcess with Prerequisite

Hi Daniel,

Thanks for your email and modified version.

This worked for us as we were expecting.

Thanks for your help!
Connor
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: DetectProcess with Prerequisite

You are always welcome Connor.

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

Return to “Common Problems”