I have been trying to customize the PSADT for my organisations, closeapps works really well, but you have to list all the apps that need to be closed especially if there is a reboot involved. I have been asked if there is a way to determine whether a user is logged in if they they get the installwelcome prompt with the defer button and if they are logged off the installation continues without any prompts.
thanks for your help.
You could use the -ForceCloseAppsCountdown paramater with Show-InstallationWelcome. That way if a user does not respond in a set amount of time the installation would forcibly close the applications and continue with the install.
You should be able to use the -AllowDeferCloseApps parameter instead of -AllowDefer
This will only prompt the user with the defer popup if any of the listed apps are running.
Enables an optional defer button to allow the user to defer the installation only if there are running applications that need to be closed.