Hi all,
I have the problem while using defers that not all process are killed at once.
I have multiple processes that need to be all killed at once since they have a watcher and will spawn each others if one of it is down.
By using this it works:
Show-InstallationPrompt -Title "Installing FortClient" -Message "The latest version of FortiClient will be installed on your system.
Note that a machine reboot will be required if you had a previous installation.
The installation can be deffered 3 times" -ButtonRightText "OK" -Icon "Information"
Show-InstallationWelcome -CloseApps 'FortiClient,FortiSettings,FortiSSLVPNdaemon,FortiTray,FortiESNAC' -Silent
But since I want to utilize the defers, I tried the following:
Show-InstallationPrompt -Title "Installing FortClient" -Message "The latest version of FortiClient will be installed on your system.
Note that a machine reboot will be required if you had a previous installation.
The installation can be deffered 3 times" -ButtonRightText "OK" -Icon "Information"
## Show Welcome Message, Close FortiClient Processes
Show-InstallationWelcome -CloseApps 'FortiClient,FortiSettings,FortiSSLVPNdaemon,FortiTray,FortiESNAC' -AllowDefer -DeferTimes 3
This will result in only the first process to be killed but it will get auto-spawned so quick that the PSADT will re-prompt to close causing a loop since the process respawns so fast.
I tried using -BlockExecution but it never worked.
I tried doing something like:
Show-InstallationPrompt -Title "Installing FortClient" -Message "The latest version of FortiClient will be installed on your system.
Note that a machine reboot will be required if you had a previous installation.
The installation can be deffered 3 times" -ButtonRightText "OK" -Icon "Information"
Show-InstallationWelcome -AllowDefer -DeferTimes 3
Show-InstallationWelcome -CloseApps 'FortiClient,FortiSettings,FortiSSLVPNdaemon,FortiTray,FortiESNAC' -Silent
But sadly again the respawn is so fast that PSADT couldn’t manage to jump to the silent line and will reprompt on the defer.
How do you guys handle that for multi processes without letting off defers functionality?
I tried to modify the main file to change the behavior into close all apps behavior but so far failed to do so.
Any tips are highly appreciated.
Thanks in Advance!