Nikolay Shalyavski
Posts: 7
Joined: Thu Sep 15, 2022 1:24 pm

Bundle installation of feature-based prerequisites relaunched after windows explorer restart

Thu Sep 15, 2022 2:48 pm

HI team,

I have a bundle installation (built with Advanced Installer 19.5) installing two feature-base prerequisites (which are separate installations built again with Advanced Installer). Second prerequisite installation has a custom action to restart windows explorer which causes bundle to relaunch. I have inspected bundle installer activity (via Process Monitor) and found it creates two registries:
- HKEY_CURRENT_USER\SOFTWARE\[Manufacturer] AiTemp
- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce\{ProductCode}
Creating RunOnce registry causes bundle relaunching when Windows explorer is restarted by second prerequisite installation (still sometimes is not reproduced when bundle installation finishes and delete RunOnce registry before explorer trying to read it after restarting). Also observed these registries are created when installing more than one prerequisite, when installing single prerequisite (even the second one which restarts the explorer) the behavior is correct.

So the question is how can I prevent creating these registry keys and respective bundle relaunching when explorer is restarted.

I have attached sample project(s) (bundle.aip with two prerequisites installer projects, second one restarts the explorer). Also installation log is attached. Noticed RunOnce registry is created during AI_ExtractPrereq actions.

Thanks,
Nikolay.
Attachments
bundle-sample.zip
(12.75KiB)Downloaded 109 times
Bundle-3.3.3.333.log
(271.46KiB)Downloaded 103 times

Nikolay Shalyavski
Posts: 7
Joined: Thu Sep 15, 2022 1:24 pm

Re: Bundle installation of feature-based prerequisites relaunched after windows explorer restart

Mon Sep 19, 2022 11:07 am

Hi team,

Can we get an update on this?

Regards,
Nikolay.

Nikolay Shalyavski
Posts: 7
Joined: Thu Sep 15, 2022 1:24 pm

Re: Bundle installation of feature-based prerequisites relaunched after windows explorer restart

Mon Sep 19, 2022 12:53 pm

Hi,

Just noticed when using /passive switch in MSI command line (bundle.aip -> Builds -> MS command line -> /L*V "[WindowsVolume][|ProductName]-[|ProductVersion].log" /passive) the issue is not reproduced but bundle installer as expected is running without UI.

Thanks,
Nikolay.

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

Re: Bundle installation of feature-based prerequisites relaunched after windows explorer restart

Wed Sep 21, 2022 3:50 pm

Hello Nikolay and welcome to our forums,

First of all, please accept my apologies for the quite delayed reply.

Regarding the RunOnce key, this is usually used for when a prerequisite requires a restart, so the main setup is relaunched after the restart to finish the installation (e.g. the installation of a second prerequisite).
Just noticed when using /passive switch in MSI command line (bundle.aip -> Builds -> MS command line -> /L*V "[WindowsVolume][|ProductName]-[|ProductVersion].log" /passive) the issue is not reproduced but bundle installer as expected is running without UI.
This most likely happens because when the main package is launched with no UI, the feature-based prerequisites are installed after the main installation (similar to post-install prerequisites).

Now, I have tested the sample project you have sent me and I was not able to reproduce the behavior you described. I have tested this on my VM, multiple times by reverting the VM and it never occured (out of like 5 times).

Are you able to constantly reproduce this, or it rarely occurs?

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

Nikolay Shalyavski
Posts: 7
Joined: Thu Sep 15, 2022 1:24 pm

Re: Bundle installation of feature-based prerequisites relaunched after windows explorer restart

Thu Sep 22, 2022 7:28 am

Hi Catalin,

Thank you for the reply. Yes, on my VM I am able to reproduce this.
VM details:
- Windows 10 (see attached 'winver' screenshot)
- logged user is NOT Administrator, maybe this is somehow related
Also I am building the project with Advanced Installer 19.5. Will try on another VM and with different user and let you know.

FYI: Another workaround I found is to remove ALL prerequisites and install them using custom actions (prerequisites as attached files). In this cases RunOnce registry is not created but still is a workaround, not solving the problem.

Regrads,
Nikolay.
Attachments
Capture.PNG
Capture.PNG (38.74KiB)Viewed 3939 times

Nikolay Shalyavski
Posts: 7
Joined: Thu Sep 15, 2022 1:24 pm

Re: Bundle installation of feature-based prerequisites relaunched after windows explorer restart

Thu Sep 22, 2022 12:40 pm

Hi Catalin,

I have tested on 2 different VMs and on one was 100% reproduced (Windows server + Administrator), on the another one (Windows 10 + Administrator) was not. Still on both machines RunOnce/Ai Temp registries I described above were created (monitor bundle installer activity using ProcMon), then deleted on installation finish.
So how can I prevent the installer creating these registry keys. Note that they are created ONLY when more than one prerequisite is selected to be installed.

Thanks,
Nikolay.

Nikolay Shalyavski
Posts: 7
Joined: Thu Sep 15, 2022 1:24 pm

Re: Bundle installation of feature-based prerequisites relaunched after windows explorer restart

Mon Sep 26, 2022 10:33 am

Hi Catalin,

Do you have any suggestions. As you can see my prerequisite/bundle samples do not require machine restart but still bundle installer creates RunOnce registry when installing more than one prerequisite, when selected just one of the prerequisites this does not happened. So again how can I prevent this behavior.

Regards,
Nikolay.

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

Re: Bundle installation of feature-based prerequisites relaunched after windows explorer restart

Tue Sep 27, 2022 2:19 pm

Hello Nikolay,

First of all, please accept my apologies for the delayed reply, we've been quite busy lately.

If possible, could you please let us know why you need to restart the explorer.exe? Are you installing drivers with your setup?

I tested this scenario today on a WinServer 2019 machine and I was finally able to reproduce it on my end as well.

Unfortunately, I'm afraid I was not able to find a workaround for this as for this moment.

That "RunOnce" registry entry is a fallback mechanism. We initially try to create a scheduled task and, if that fails, we create the RunOnce key.

I have forwarded it to our development team for further investigations.

I will update this thread once I will have more information regarding this.

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

Nikolay Shalyavski
Posts: 7
Joined: Thu Sep 15, 2022 1:24 pm

Re: Bundle installation of feature-based prerequisites relaunched after windows explorer restart

Wed Sep 28, 2022 9:27 am

Hi Catalin,

Our prerequisite installer (part of bundle with other prerequisites) must restart explorer.exe because it installs windows explorer shell extension DLL (windows explorer integration - icons, context menu etc.). So in order DLL to be loaded by windows explorer process it should be restarted. I am talking about our production installer, bundle.aip is just a sample I have provided to reproduce the problem.

Actually I have found a workaround to prevent creating RunOnce registry - moved all prerequisites from feature-based to post-install. It seems it is working - prerequisites are installed correctly based on user selection - but let me know if I am missing something or there are possible problems with this approach.

Regards,
Nikolay.

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

Re: Bundle installation of feature-based prerequisites relaunched after windows explorer restart

Thu Sep 29, 2022 10:38 am

Hello Nikolay,

That's great news! Thank you for sharing your solution with us.
but let me know if I am missing something or there are possible problems with this approach.
There shouldn't be any issues with this approach. Feature-based and post-install prerequisite are basically the same. The only thing that differs is their scheduling.

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

Return to “Common Problems”