Show-InstallationWelcome Auto Defer

Has anyone modified Show-InstallationWelcome or can tell me how to modify it so that if there is a deferral left, show the countdown timer and if that countdown timer runs out, have it auto defer instead of continuing with the installation and return 1618 so SCCM will do fast-retry? I can get the timer to show up but have not been able to figure out what to change to have it auto defer. Also, need to change the wording of the on the dialog so it does not say ‘NOTE: The program(s) will be automatically closed in:’
Any quick help would be appreciated.

I figured it out. I now have a Show-InstallationWelcome and Show-WelcomePrompt functions that always display a countdown timer if there are referrals left. And with deferrals left, when the timer runs down, the installation is deferred. Once deferrals are gone or expired, when the countdown timer runs out, the installation continues. I try and post the changes tomorrow.