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

Launch installed program fails when package type is MSI

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.32 KiB) Viewed 7446 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.33 KiB) Viewed 7446 times
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: Launch installed program fails when package type is MSI

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

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.37 KiB) Viewed 7390 times
joefio
Posts: 23
Joined: Thu Apr 20, 2023 2:14 pm

Re: Launch installed program fails when package type is MSI

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

I was able to resolve the issue by using the 'Launch file' custom action instead of the 'Launch installed file"
Liviu
Posts: 1042
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Launch installed program fails when package type is MSI

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”