Is there a way to only display the ShowInstallationWelcome only when the specified apps are opened? V4.0.5

Hello,

I have to update a stupid software with just a copy job on the client.
I could do this with our deployment software very easy, but i have to check if the software is running.
I only need a ShowInstallationWelcome when the software is running, if not the copy job can work silent.
I found some old question with solutions for this.
Is it possible with the PSADT 4.0.5 also?

Has someone tested it or did someone adjustments for it?

Is it out of the box possible or do i need to add someting?

Thanks for any idea or help

NicoST

Its on our radar: [Feature] Create a new parameter "Dynamic" to execute Invoke-AppDeployToolkit.exe install dynamic · Issue #1297 · PSAppDeployToolkit/PSAppDeployToolkit · GitHub. For now, you’ll need to do some local determination within Invoke-AppDeployToolkit.ps1 prior to the Open-ADTSession call.

1 Like

We changed ours from:

##================================================
    ## MARK: Pre-Install
    ##================================================
    $adtSession.InstallPhase = "Pre-$($adtSession.DeploymentType)"

    ## Show Welcome Message, close Internet Explorer if required, allow up to 3 deferrals, verify there is enough disk space to complete the install, and persist the prompt.
    Show-ADTInstallationWelcome -CloseProcesses iexplore -AllowDefer -DeferTimes 3 -CheckDiskSpace -PersistPrompt

    ## Show Progress Message (with the default message).
    Show-ADTInstallationProgress

    ## <Perform Pre-Installation tasks here>

to

##================================================
    ## MARK: Pre-Install
    ##================================================
    $adtSession.InstallPhase = "Pre-$($adtSession.DeploymentType)"

    ## Check if app is running and if it is, show the notifications
    if (Get-Process -Name 'AfterFX' -ErrorAction SilentlyContinue) {
        $AppRunning = $true
		## Show Welcome Message, close After FX if required, allow up to 3 deferrals, and persist the prompt.
		Show-ADTInstallationWelcome -CloseProcesses 'AfterFX' -ForceCloseProcessesCountdown 30 -PersistPrompt -BlockExecution -AllowDefer -DeferTimes 3
	}
    ## Show Progress Message (with the default message).
    Show-ADTInstallationProgress

    ## <Perform Pre-Installation tasks here>

Obviously, change the process name to whatever it is you’re installing.

BTW, the $AppRunning = $true line can be removed. I only put it there because in the Post-Install phase, I check that if the app was running when PSADT ran, then I need to notify the user that the install has ended (i.e. I show an installation successful message), otherwise I just end silently.

2 Likes

Many thanks

this solution works.

@ mjr4077au

I am curious when this feature will be officially implemented

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.