Wed Apr 03, 2019 10:25 am
Hello Jan,
You are always welcome, Jan. Glad I could help.
When a post-install prerequisite is launched for execution, it is launched asynchronously (the main installation process does not wait for it to end, due to the fact that 2 installation processes can not run at the same time). With that being said, it means that the main installation process ends before the post-install prerequisite is even installed, which makes it hard (actually impossible) to schedule a custom action after the post-install prerequisite was installed.
However, there is a little trick which you can use to achieve what you want. The action that launches the post-install prerequisites is called "AI_LaunchChainer". This action simply launches a little EXE which deploys post-install prerequisites one by one, in the order specified in the "Prerequisites" page. So here is my solution to your problem: you can create a dummy project in which you will have only your custom action. You can build this project and add the resulted MSI as a post-install prerequisite in your main package, scheduled after the installation of your .NET Core Hosting.
Here are few configuration settings to make your dummy prerequisite "nonexistent":
- in the dummy prerequisite project, please go to "Product Details" page and untick the "Register product with Windows Installer" option. This way, the prerequisite will not appear in Control Panel.
- in the main project, please fill all the prerequisite command line fields ("Prerequisites" page --> click on your dummy prerequisite" --> "Setup Files" tab --> "Install Command Lines") with "/qn", so the prerequisite will be run silently.
Hope this helps.
All the best,
Catalin