This project is read-only.

test whether app is in use, else just update it.

Topics: Archive - General, Archive - Toolkit Extensions
Oct 20, 2014 at 9:11 AM

I have been using an if/else in my scripts to test if the program/app I want to update is running and if it is, THEN I'll show the 'welcome' screen and have the user upgrade it himself.
if app not running, then the script will just update the app.

I was wondering if it was an idea to integrate this into the base functionality of the psappdeployment script?

maybe a switch you add to the deployment or something similar...

this is of course partly me being lazy and not just doing the if/else everytime but I was thinking that it might be useful to have this on our toolbox as well.

why should we wait for the user to do interact with an update of a program if that program isn't running at the time the deployment script starts.

this would be the least intrusive way to deploy software..

Oct 20, 2014 at 9:40 PM
Just use the -AllowDeferCloseApps parameter! It will only display prompt if there are running apps.
Oct 28, 2014 at 9:42 AM
nice.. so I should use that instead of -AllowDefer?

My installation welcome is this for Java:
Show-InstallationWelcome -CloseApps "iexplore,chrome,firefox" -AllowDefer -DeferTimes 3 -DeferDays 7 -CheckDiskSpace -PersistPrompt -BlockExecution -MinimizeWindows $false

So I should change it to:
Show-InstallationWelcome -CloseApps "iexplore,chrome,firefox" -AllowDeferCloseApps -DeferTimes 3 -DeferDays 7 -CheckDiskSpace -PersistPrompt -BlockExecution -MinimizeWindows $false


is there anyway I could do this:

if allowdefercloseapps is triggered:
Show-InstallationPrompt -Message "we'd like to update... etc etc"
then show installationwelcome..

Oct 28, 2014 at 10:18 PM
If you only want to allow deferral when there are apps to close than use that.

If you want to show a different message first you could either edit the main toolkit directly or just check for those running processes and show the custom message before calling Show-InstallationPrompt
Dec 10, 2014 at 7:26 AM
A quick follow up question..
If I use this:

Show-InstallationWelcome -CloseApps 'iexplore' -AllowDeferCloseApps -DeferTimes 1 -CheckDiskSpace -PersistPrompt
## Show Progress Message (with the default message)
AND the user doesn't have ie running.. it will just start the installation..? Correct?

Furthermore.. will it, if ie is not running, still display the "Show-InstallationProgress" ?

I was thinking.. it ie is not running.. everything will run silently.. no reason to show any messages if the user doesn't have to do anything..

Dec 10, 2014 at 9:21 PM
I suggest testing with both parameters -AllowDefer and AllowDeferCloseApps and that will tell you everything you need to know.