When I deploy the application as available or the user hits Retry the show-installationwelcome works. When I deploy the software as required it through SCCM the welcome message doesn’t show and it force closes applications without warning.
You appear to be detecting multiple applications that could possibly be running when the application deployment commences - I use this detection quite often with different applications without issue (I’m using PSADT v 3.9.3 for all my deployments - albeit deployed via Intune)
What is not clear from your snippet of code is:
What command line you use to install this from SCCM?
What version of PSADT are you using?
I vaguely remember there may have been a similar issue with an earlier version of PSADT which was resolved at some stage, so updating your PSADT might solve this.
Is this within the PRE-INSTALLATION section of your Deploy-Application.ps1?
Do you have any other commands after the [String]$installPhase = 'Pre-Installation' line and before this line?
N.B. To make it more obvious to our user base, when the Close Apps prompt is displayed, I tend to include human readable names for each application which needs to be closed - so, using your code as an example; these are the names after the “=” and before the “,”
In SCCM have you enabled the configuration option “Allow users to view and interact with the program installation” under the “User Experience” Tab on the deployment type you are using for your required deployment?
Can you provide a log file of an installation that doesn’t show any warnings?