joefio
Posts: 23
Joined: Thu Apr 20, 2023 2:14 pm

Launch installed program fails when package type is MSI

Wed Apr 26, 2023 3:36 pm

When I build my installer as a Single MSI and run the installer my Launch installed program custom action appears to be failing:
InstallError.PNG
InstallError.PNG (14.32KiB)Viewed 7365 times
When I build the installer as a Single EXE setup the custom action works fine.

Below is the custom action I am trying to execute. It is called at the end of the Installation sequence.
customaction.PNG
customaction.PNG (40.33KiB)Viewed 7365 times

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

Re: Launch installed program fails when package type is MSI

Fri Apr 28, 2023 11:35 am

Hello,

I can't really say why this is happening.

When do you schedule the custom action? Please note it should be scheduled after the "Add resources" action group, with its' "Execution Time" set to "When the system is being modified (deferred)".

In your case, I see that it is scheduled as "Immediate" which happens before the files are actually copied on the disk.

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

joefio
Posts: 23
Joined: Thu Apr 20, 2023 2:14 pm

Re: Launch installed program fails when package type is MSI

Fri Apr 28, 2023 1:57 pm

Catalin wrote:
Fri Apr 28, 2023 11:35 am
Hello,

I can't really say why this is happening.

When do you schedule the custom action? Please note it should be scheduled after the "Add resources" action group, with its' "Execution Time" set to "When the system is being modified (deferred)".

In your case, I see that it is scheduled as "Immediate" which happens before the files are actually copied on the disk.

Best regards,
Catalin
Hi Catalin,

I scheduled the custom action after 'Add Resources' and before 'Finish Execution' and set the execution time to 'When the system is being modified(deferred)' but I am still getting the same behavior. However if I choose to build as a single exe it still works fine.
InstallExecution.PNG
InstallExecution.PNG (27.37KiB)Viewed 7309 times

joefio
Posts: 23
Joined: Thu Apr 20, 2023 2:14 pm

Re: Launch installed program fails when package type is MSI

Mon May 01, 2023 6:13 pm

If I check "Run under the LocalSystem account with full privileges (no impersonation)" under Execution options then I do not receive the error/warning when building as a Single MSI. However, my config program won't work correctly with this setting. If I build as a single EXE I do not need to select this option. Is there any way to call an exe program, when building as a single MSI package, without using this setting?

joefio
Posts: 23
Joined: Thu Apr 20, 2023 2:14 pm

Re: Launch installed program fails when package type is MSI

Mon May 01, 2023 8:59 pm

I was able to resolve the issue by using the 'Launch file' custom action instead of the 'Launch installed file"

Liviu
Posts: 1035
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Launch installed program fails when package type is MSI

Tue May 02, 2023 7:35 am

Hello,

Thank you for your follow-up.

It's great to hear that everything is now working as expected.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”