Question regarding defered installation

Hello,

I’m kind of new into PSADT, right now I want to use deferal option while upgrading from Office 2016 to 365 but I’m not 100% sure how to archieve that.

Question is how do you manage interval between script rerun?

To be more precise right now when user click deferal button application is shown inside Software Center as failed, and from my current understanding it will try to install again after 7 days as per default “Application Deployment Evaluation Cycle”.

This is way too long, but I also don’t want to modify default client settings.
My only guess is to pass 1618 exit code if user deffers installation which is SCCM Fast Retry code.
How would you achieve that?

Thank you for your help

If ($deploymentType -ine 'Uninstall' -and $deploymentType -ine 'Repair') {
		##*===============================================
		##* PRE-INSTALLATION
		##*===============================================
		[string]$installPhase = 'Pre-Installation'

        Show-InstallationPrompt -Title 'Office 365 Installation Tool' -Message 'You are about to upgrade from Office 2016 to Office 365. Save all opened Office files (they will be not deleted from your hard drive). During installation you cant use Office apps. Installation takes ~30 minutes. Remember that in the meantime you can always use Microsoft Office suite online by visiting https://office.com and logging in with your e-mail account. If you dont have time for upgrade right now you can deffer it on the next screen' -ButtonMiddleText 'Continue'

		## 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-InstallationWelcome -AllowDefer -DeferTimes 5 -CloseApps "iexplore,communicator,ucmapi,excel,groove,microsoftedge,onenote,infopath,onenote,outlook,mspub,powerpnt,winword,winproj,visio,teams" -CloseAppsCountdown 5400 -CheckDiskSpace -PersistPrompt

		## <Perform Pre-Installation tasks here>


		##*===============================================
		##* INSTALLATION
		##*===============================================
		[string]$installPhase = 'Installation'

		## Handle Zero-Config MSI Installations
		If ($useDefaultMsi) {
			[hashtable]$ExecuteDefaultMSISplat =  @{ Action = 'Install'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
			Execute-MSI @ExecuteDefaultMSISplat; If ($defaultMspFiles) { $defaultMspFiles | ForEach-Object { Execute-MSI -Action 'Patch' -Path $_ } }
		}

		## <Perform Installation tasks here>

        $Path1 = Test-Path "$envProgramFiles\Microsoft Office\Office16\EXCEL.exe" -PathType Leaf
        $RegistryExist = Test-Path -Path HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration
        $RegistryValue = Get-ItemPropertyValue -Path 'HKLM:\SOFTWARE\Microsoft\Office\ClickToRun\Configuration' -Name ProductReleaseIds

        If ($Path1 -eq $True -or $RegistryValue -ine 'O365ProPlusRetail' -or $RegistryExist -eq $False) { 
            Show-InstallationProgress "Uninstalling Microsoft Office 2016"
		    Write-Log "Microsoft Office 2016 was detected. Uninstalling..."
			Execute-Process -FilePath "$dirsupportFiles\SaRAcmd.Exe" -Arguments '-S OfficeScrubScenario -AcceptEula'
            Show-InstallationProgress "Installing Microsoft Office 365 ProPlus"
            Execute-Process "$dirFiles\Setup.exe" -Parameters "/configure configuration.xml"
		}

        else {
            Show-InstallationPrompt -Message 'Office 365 is already installed' -ButtonRightText 'OK' -Icon Information -NoWait
            Exit-Script -ExitCode $mainExitCode
        }

You might have to change how often the default “Application Deployment Evaluation Cycle” triggers.

The only idea I have is to create a scheduled task to trigger “Application Deployment Evaluation Cycle” client action as you see fit.

Hello @That-Annoying-Guy

That is what I thought but in my case, I have found a workaround.
Instead of application, I created a package, it has something like a custom schedule where you can specify application re-deploy after failed previous attempt.

I really don’t understand why it’s missing in application deployment since my understanding is that application superseded packages but oh well, I’m happy it’s working.

Thanks