prashanth5429
Posts: 4
Joined: Mon Aug 16, 2021 11:03 am

Create EXE and launch from installer.

Tue Aug 31, 2021 7:01 pm

Hello Team,

I've the following requirements:

  • Create standalone Exe without any UI.
  • Exe should launch powershell script which is packed inside exe.
  • This Exe is launched via Product Installer during install.
Can you guide me how to do this please?

Regards
Prashanth

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

Re: Create EXE and launch from installer.

Wed Sep 01, 2021 6:56 pm

Hello Prashanth,

In order to achieve that, all you need to do is:

- add your PowerShell script in the "Files and Folders" page

- in the "Custom Actions" page, add a "Run PowerShell script file" custom action that will launch the above added script

This custom action should be added after the "Add resources" action group, with its' "Execution Time" set to "When the system is being modified (deferred)".

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

prashanth5429
Posts: 4
Joined: Mon Aug 16, 2021 11:03 am

Re: Create EXE and launch from installer.

Thu Sep 16, 2021 2:45 pm

Ok, but can I include this exe in another Advanced Installer project to launch as Custom Actions > launch an application?

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

Re: Create EXE and launch from installer.

Fri Sep 17, 2021 5:28 pm

Hello Prashanth,

Yes, it is possible to do that.

There are actually two ways of achieving this:

1. you could add the .EXE as a prerequisite to your other project

2. you could launch it through a "Launch File" custom action. However, please note that here you can not schedule the custom action everywhere, because Windows Installer allows only one MSI-based installation to run at any given time. The setup should either be launched before the installation starts (before the "Install" button is pressed) or after the installation ends.

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

Return to “Building Installers”