Deploy-Application Runs Twice

So, as shown in the attached screenshot, Deploy-Application.exe appears to be running twice. One is running the script I made. The other appears to just show Installation in Progress. This happens only with a few packages I’ve made. I can’t seem to find a correlation between what works and what doesn’t. The example package here is one that installs all the VC++ redistributables (mix of MSIs and EXEs). Another package that doesn’t have this issue is for 7zip (MSI only). I also have other packages that use EXE installers that don’t have the issue but at least one other that is only EXE installers that has the issue. This is ruining my zero touch build and capture task sequence in MDT. This happens inside or outside MDT. Anybody got any ideas?

Can you maybe show us the log file from an affected install, and if possible, the script itself?

Thanks for the reply!
Here is the log: https://pastebin.com/t6c9VE0T
Here is the script: https://pastebin.com/UEztmasV

Thanks for your help!

And just for info’s sake, here is the 7zip package, that works just fine.
Log: https://pastebin.com/a2c4MJYy
Script: https://pastebin.com/A3VPJx8P

Also, I seem to have forgotten the main problem with what’s happening. The second running application doesn’t seem to close so the task sequence is stuck at that point until I close it manually. The packages that this happens to appear to install everything just fine.

The script contains two calls of Show-InstallationProgress. First in the Pre-Install section. This shows the complete script progress.
The second and more calls are within the install section before each execution calls. These show the single installation processes.
Disable the call in the Pre-Installation section and there should only be one progress dialog left.

1 Like

Thanks for the help!

So, each Show-InstallationProgress needs to be followed by an Execute-Process or Execute-MSI? So, you can’t have multiple Show-InstallationProgress one after another (though I can’t imagine why you would do that; I certainly didn’t do it on purpose)? While that doesn’t appear to be very clear in the documentation if that’s the case, it did fix my issue.

Show-InstallationProgress used to open another window, now it changes the text on the current running window. This function does not wait by default, so even if it did change the text back in old versions, you would see the second message right away. It is supposed to be open while another code is running in background - installing software.