Show-InstallationWelcome Defer Behaviour

Attempting to write a script to take advantage of the Show-InstallationWelcome -defer capability.

We have a requirement to check if chrome.exe is running, and if it is, allow the user to defer the installation of the new version until a time which suits them (or x number of defers).

i have created a psdeployment script which does exactly this, using the line below as a pre-install stage, then execute-msi in the installation section.

Show-InstallationWelcome -CloseApps 'chrome' -AllowDeferCloseApps -DeferTimes 10

It seemed to work, and when i deployed the application via SCCM as a required installation, the prompt appeared on my test account, allowing me to defer the installation.

My question is, when will it retry the installation… SCCM software centre says the installation has failed, and didnt retry during the time i was testing.

Is there a custom return code which could be added to account for a deferred installation, making SCCM try again at some point?

Default defer exit code is listed in AppDeployToolkitConfig.xml:
<InstallationDefer_ExitCode>60012</InstallationDefer_ExitCode>

So if i add a custom return code of 60012 to the SCCM application it will understand that?

Also, do you know if its possible to set a the defer deadline and defer times as a switch, aka setting the install command line as deploy-application.exe 10 20/01/2018

You can create your own parameters in Deploy-Application.ps1 and use these variables further on in the script

[Parameter(Mandatory=$false)]
[string]$DeferTimes,
[Parameter(Mandatory=$false)]
[string]$DeferDeadline

Show-InstallationWelcome -CloseApps ‘chrome’ -AllowDeferCloseApps -DeferTimes $DeferTimes -DeferDeadline $DeferDeadline

For me the question “when will it retry the installation… SCCM software centre says the installation has failed, and didnt retry during the time i was testing” is still not answered. Yes I see the 60012 code but when will it retry? I had the deadline on 13.10. Today is 14.10 and it’s still not installed on the machines.

Hello, you have two solutions for your problem.
The chrome MSI can be installed transparently when the user has his browser open. Once the user closes the browser, the version replacement is done automatically.
If you want to use the defer with APPDEPLOY, you can send it a code 1641 directly.
SCCM recognizes it as a failed and by default it restarts its installation after 2 hours.

Hoping that you could have helped

Regards

Hmm this won’t work for me. I give my users 3 days to install it by themselves or it should install it by force.
Right now I can’t figure it out why it wont install by force if the deadline is passed already.

This is kind of an old thread, but here’s my 2 cents.
we used the Show-installationwelcome with -defer 3 -forcecountdown 3600. so end users can defer 3 times but if the popup is ignored, the installation continues.

Hello Flux,

Hope you are doing well,

I ran the defer script manually and it worked fine on my local machine, while running this script from sccm does’t give me any defer and directly kill the process.

can you advice how can i fix that, below is the command line which i am using.

Show-InstallationWelcome -CloseApps ‘putty=Putty’ -AllowDefer -DeferTimes 3 -CheckDiskSpace -PersistPrompt

Best Regards
Ravi Kumar