The fact that two msiexec.exe processes appear in the Task Manager is normal.
This happens because the whole mxiexec process consists of two processes - the client side (the UI that is displayed) and the server side (where the modifications of the systems are done - after your press the "Install"
I have tested some more scenarios and indeed:
Do I need to close my installer window in order that the Build-Tools Installer can run successfully?
What happens if I do not click the "Finish" Button on the last page of my wizard fast enough? Will the Build Tools Installer be started and fail, since my installer is still running?
this is the reason why the Build Tools installer does not successfully installs. In this case, the user needs to press the finish button in order for the product to be successfully installed.
When testing this, I have always pressed the Finish button (most likely, out of instinct). I have now ran few tests and I could indeed notice that the product is not installed if the first msiexec process is not terminated.
Here is how I've thought we can avoid this:
- first of all, we need to change the sequence of our custom action from "with sequence"
to "without sequence"
. To do so, you can go to "Custom Actions"
page --> select your custom action --> right click on it --> "Sequence"
--> "Without Sequence"
This will allow us to trigger the custom action from a dialog button instead of it triggering automatically. I've been thinking that we can trigger the custom action when the user presses the "Finish" button so we can be sure that the main process does not interfere with the second installation.
- go to "Dialogs"
page --> select "Exit"
dialog --> select the "Finish"
button --> under "Published Events"
add a new event that will execute the custom action.
Hope this helps.