SimLoe
Posts: 66
Joined: Thu Mar 12, 2020 11:37 am

Launched exe stays in background

Tue Aug 18, 2020 8:36 am

Hi all,

I did some research in this forum and found out that for an application being launched by the installer to be in the foreground, it might be necessary to select "Run under the LocalSystem account with full privileges (no impersonation)" for a custom Action "Launch File". However, I am not able to select this option:
settings.PNG
settings.PNG (72.4KiB)Viewed 17109 times
This results in the setup looking the following way, with the launched exe being in the background:
setup.PNG
setup.PNG (79.7KiB)Viewed 17109 times
Do you have any idea what I can do in order for this window to be in the foreground?

Best regards,

Simon

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

Re: Launched exe stays in background

Mon Aug 31, 2020 11:35 am

Hello Simon,

Please accept my apologies for such a delayed reply (I've been off for a week).

I have tested this, but unfortunately I was not able to replicate the same behavior.

Unfortuantely, even though we have faced this issue in the past, I can not really say why it happens, the behaviour being pretty random.

From what I know, it is the OS that controls the focus of a window.

In order for me to further test and investigate this, could you please forward me a test project (.AIP file) that reproduces this (of course, together with a download link for the executable that is launched in the background) by e-mail at support at advancedinstaller dot com?

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

SimLoe
Posts: 66
Joined: Thu Mar 12, 2020 11:37 am

Re: Launched exe stays in background

Wed Sep 16, 2020 11:08 am

Hello Catalin,

just wanted to check whether you have received my email which I sent 9 days ago.

Please keep me up to date!

Best regards,
Simon

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

Re: Launched exe stays in background

Wed Sep 16, 2020 5:28 pm

Hello Simon,

First of all, I apologize for such a delayed reply, we were pretty busy lately.

Yes, I did receive the files and I also managed to reproduce the behavior. I am currently still investigating this (trying to find the root cause for this problem).

Sure thing, I will notify you as soon as I find anything that might be of help (the only reason I did not notify you is because I did not find anything just yet).

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

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

Re: Launched exe stays in background

Thu Sep 17, 2020 12:56 pm

Hello Simon,

I've done some more testing last night and I believe I was able to find the culprit here.

The issue seems to be related to the fact that you have "Run as administrator" on your main package.

I am afraid, however, that this issue might not be related to Advanced Installer, but to the OS.

Even if you do not have the "Run as administrator" option enabled from the "Install Parameters" page and you run the setup elevated (e.g. right click on the EXE --> "Run as administrator"), the same will happen. Considering this is happening outside of Advanced Installer as well (when manually running the setup elevated), I am afraid that this issue is not related to our option, but to the fact itself that the setup is run elevated from the start.

Unfortunately, I can not really say what's the reasoning behind this.

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

SimLoe
Posts: 66
Joined: Thu Mar 12, 2020 11:37 am

Re: Launched exe stays in background

Tue Oct 06, 2020 1:58 pm

Hello Catalin,

I spent some time researching this behavior in the last couple of days:

When I am using the following options, there is an UAC prompt and after clicking OK, the text box appears in the foreground:
Setup "Run as administrator" option enabled from the "Install Parameters", the Custom Action "Launch File" not "Run as Administrator"

Our developers then modified the exe that is being launced in the Custom Action, so that it does not require administrative rights anymore, I used the same settings as above, there were no UAC prompts and then the text box appears in the background.

However, I did not expect this behavior, and I was hoping that it would stay in the foreground. Prior to Advanced Installer, we used (and are still using) NSIS. With NSIS it is possible that the text box appears in the foreground without UAC prompts. From this I conclude, that this is not a OS specific issue but something coming directly from Advanced Installer.

You should be able to replicate this behavior by simply launching an exe that lets a text box pop up in a sample project as a custom action.

Hopefully, you will find a solution for this, since we will have several calls with several text boxes in our setup and the should not stay in the background, nor should the user have to click the UAC prompt all the time...

Best regards,
Simon

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

Re: Launched exe stays in background

Fri Oct 09, 2020 3:53 pm

Hello Simon,

Unfortunately, I can not really say why this is happening.

In all my tests, this seems to be pointing out to the fact that the main setup is ran as Administrator.
When I am using the following options, there is an UAC prompt and after clicking OK, the text box appears in the foreground:
Setup "Run as administrator" option enabled from the "Install Parameters", the Custom Action "Launch File" not "Run as Administrator"
I have tried to force my EXE to always run as administrator (as your EXE) to test this, but I did not manage to do much here. I have used the "Run this program as Administrator" option, but it did not prompt me with the UAC when it was launched by the custom action:
RunAsAdmin.png
RunAsAdmin.png (172.67KiB)Viewed 16816 times
Our developers then modified the exe that is being launced in the Custom Action, so that it does not require administrative rights anymore, I used the same settings as above, there were no UAC prompts and then the text box appears in the background.
This one I did indeed manage to reproduce. In fact, this was the main scenario I was testing:

- "Run as Administrator" on the main package

- no "Run as Administrator" option on the custom action

For the moment, I have forwarded this to our development team for further investigations.

I will update this thread as soon as I have any information that might be of help here.

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

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

Re: Launched exe stays in background

Wed Oct 28, 2020 7:27 pm

Hello Simon,

This issue has been fixed in version 17.6 of Advanced Installer, released on October 22nd, 2020.

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

SimLoe
Posts: 66
Joined: Thu Mar 12, 2020 11:37 am

Re: Launched exe stays in background

Thu Jan 14, 2021 3:41 pm

Hi Catalin,
sorry for the late reply, I just saw your answer a couple of days ago. You said that this issue was fixed, but I can't see any changes in the behavior. I tested version 17.7 and 17.8 but I still have the pop ups in the background.

Should I be using the "Launch file" action with the option "Run as administrator" or the "Launch installed file" action? Which behavior is expected with which kind of settings?

Best regards,

Simon

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

Re: Launched exe stays in background

Mon Jan 18, 2021 3:28 pm

Hello Simon,

I have run a few tests myself and I was indeed able to reproduce this.

This somehow seems to have gotten past our QA team. I apologize for this inconvenience.

I have now reopened the issue and our development team should have a look over it in the upcoming future.

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

SimLoe
Posts: 66
Joined: Thu Mar 12, 2020 11:37 am

Re: Launched exe stays in background

Thu Feb 18, 2021 2:26 pm

Hello Catalin,

do you already have some updates for me? Will the fix be included in the next version?

Best regards,
Simon

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

Re: Launched exe stays in background

Thu Feb 18, 2021 3:39 pm

Hello Simon,

Unfortunately, I'm afraid I do not have any update on this issue.

I will try to increase its' priority in our bug tracking tool.

To be fully honest with you, judging by the look of it, I doubt it may get included in the next release (theoretically, the next release is scheduled next Monday).

I will update this thread as soon as I will have more information on this.

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

SimLoe
Posts: 66
Joined: Thu Mar 12, 2020 11:37 am

Re: Launched exe stays in background

Thu Mar 18, 2021 4:07 pm

Hello Catalin,

do you already know if this fix will be included in the next release?
Just a reminder that I started this topic last August...

Best regards,

Simon

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

Re: Launched exe stays in background

Fri Mar 19, 2021 5:36 pm

Hello Simon,

Unfortunately, the issue has not yet been fixed.

I have increased its' priority and discussed this with the developer in charge. I'm afraid this might not reach our next release, since it is scheduled for the next Monday. However, we will do our best to include it in the release to come afterwards.

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

SimLoe
Posts: 66
Joined: Thu Mar 12, 2020 11:37 am

Re: Launched exe stays in background

Tue Apr 06, 2021 11:12 am

Hi Catalin,

just wanted to check if you have any news on this topic? Can I expect a solution in the upcoming release?

Best regards,

Simon

Return to “Common Problems”