Show prompts if process running, else run silently

//Show prompts if process running, else run silently
Show prompts if process running, else run silently 2017-10-23T11:04:04+00:00

The Toolkit Forums General Show prompts if process running, else run silently

  • Author
    Posts
  • Rasmus
    Participant
    Post count: 2
    #2380 |

    Hi all,

    Is there a way to deploy PSADT and only show prompts InstallationWelcome and other prompts if a certain process is running? I would like to deploy a new version of, let’s say Firefox, and if it’s running I want users to have a prompt to shut it down. If not, I would like the install to be silent and have the users not notice anything.

    Br,
    Rasmus

  • Jim
    Participant
    Post count: 43

    How about something like this?

    $Notepad = Get-Process -Name notepad -ErrorAction SilentlyContinue
    If ($Notepad) {
    Show-InstallationProgress -StatusMessage 'Installing software'
    }

  • Seán Lillis
    Keymaster
    Post count: 12

    If you specify a process to be closed but don’t add a deferral option to the Show-InstallationWelcome function, then it will only display to the user if there is a process to close, otherwise the installation will continue without showing the welcome dialog.

You must be logged in to reply to this topic.