I cant find an option or command to abort the installation if a specified process, eg. iexplore.exe is running. In Interactive mode the command Show-InstallationWelcome can hold some process names. But it wont ask if the script runs in NonInteractive mode. In this case all named processes will be closed. But I want to abort the script OR also ask the user to close the apps in NonInteractive mode…
As I see it, the whole purpose of NonInteractive mode is to have the toolkit running without the user interaction… So in the show-installationwelcome would do it’s thing without making the user aware.
If using the CloseApps parameter in Show-InstallationWelcome, do not add iexplore to the list of apps to close as this would exit IE and the If statement would always be untrue…
The variable $IsProcessUserInteractive is created by the toolkit, but I haven’t tested it out so I’m not totally sure this will work… And the exitcode could be any number really, but the 69000 - 69999 are recommended for custom exit codes.
its a good idea! But it wont work with your code. Because $IsProcessUserInteractive is still $true if $DeployMode=‘NonInteractive’. Seems to be ‘Silent’…