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 “,”
Yes, this is part of the pre-installation. Thanks for the human readable suggestion. I haven’t seen that anywhere in any of the documentation I have read thus far.
When deployed as available these deployments work 100% as expected.
I wonder…
Are you deploying this application as System or as a user?
If System… What if you use ServiceUi.exe and remove the interactive seting in your command line?
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?
The PSADT install log file for the application. Default location is C:\Windows\Logs\Software
Naming is like: $appVendor_$appName_$appVersion_$appLang_$appRevision_PSAppDeployToolkit_Install.log