Is there a way to minimize show-installationwelcome, similar to show-installationrestartprompt? We are looking to use show-installationwelcome to have a 60 minute countdown before apps are automatically closed, but we’d like to allow the user to click a ‘remind me later’ button where the window will minimize until the time specified in -countdownnohideseconds. At that point the ‘remind me later’ button will be greyed out and the window cannot be hidden. This is very similar to show-installationrestartprompt.
Funny timing on this, I was just asked this morning to do the same. These are what I found and set to true:
(in AppDeployToolkitMain.ps1)
$formInstallationPrompt.MinimizeBox = $true
$formCountdown.MinimizeBox = $true
$formWelcome.MinimizeBox = $true
This enables the minimize button just to the left of the “X” close window button.
I also have a 60 minute countdown prior to auto close of apps and I have the persist prompt enabled and set to 11 minutes so it gives them an approximate 5 minutes remaining after 5 persist prompts.
BUT, when I minimize the Installation Welcome window, the persist prompt no longer brings it back front and center after the specified amount of time. Not sure how to fix that.
I’m also trying to figure out how to, as an alternative, extend the length of time the window is hidden when the user closes it. It pops back up after about 5 seconds, but I wonder if we can make it stay hidden for 30 minutes when they click the X to close. I’m guessing a Start-Sleep cmd somewhere, but can’t figure out where.
Sorry for the late response. I ended up copying the functions Show-InstallationWelcome and Show-Welcome prompt to AppDeployToolkitExtensions.ps1. I then made changes there. I added a ‘Remind Me Later’ button which, when clicked, will minimize the prompt. I then did a couple of IF statements, when the timer hits 60 minutes remaining pop back up, when it hits 5 minutes pop up, grey out remind me later and change the countdown text to red. I used the defer button as a template. There is a bug in 3.6.4 with the TopMost parameter, if you look at the upcoming change log you can find the fix there.
Hope this helps put you on the right path.
Great solution and thanks for the tips! The two functions you copied to the Extensions file are the ones I’ve been working with, but have been a bit lost. I’ve not worked with anything in the Extensions file yet, but will give it a try. I’ve at least copied those two functions over to it so far, but I wonder how the toolkit knows to use those functions from the Extensions file rather than the ones already in the Main file. Did you rename them and call them by their new names from Deploy-Application?
Your solution would work great in my case, but I haven’t figured out where exactly to put the IF statements or what they’d look like. Any chance you could post a portion of it? I think I can figure out how to create a new button, but I’ve no idea how to add those IF statements and minimize / popup functions to it.
Definitely helpful, thanks much!
Yea, I renamed the functions when I copied them to the extension file. Once you have copied and renamed the functions be sure to update the function names, for instance I believe in the show-installationwelcome code it calls show-welcomeprompt, so just update those names.
## If the countdown is complete, close the application(s) If ($countdownTime -lt $currentTime) { Write-Log -Message 'Close application(s) countdown timer has elapsed. Force closing application(s).' -Source ${CmdletName} $buttonCloseApps.PerformClick() } Else { # Update the form [string]$labelCountdownSeconds = [string]::Format('{0}:{1:d2}:{2:d2}', $remainingTime.Hours, $remainingTime.Minutes, $remainingTime.Seconds) $labelCountdown.Text = "$configClosePromptCountdownMessage`n$labelCountdownSeconds"if($labelCountdownSeconds -eq "1:00:00") #RemindMeLater { $formWelcome.WindowState = 'Normal' $formWelcome.BringToFront() $formWelcome.Refresh() } if($labelCountdownSeconds -eq "0:30:00") #RemindMeLater { $formWelcome.WindowState = 'Normal' $formWelcome.BringToFront() $formWelcome.Refresh() } if($labelCountdownSeconds -eq "0:05:00") #RemindMeLater { $labelCountdown.ForeColor = 'Red' $labelApp.ForeColor = 'Red' $shellApp.MinimizeAll() | Out-Null $buttonRemindMeLater.Enabled = $false $formWelcome.BringToFront() $formWelcome.WindowState = 'Normal' $formWelcome.TopMost = $true $formWelcome.BringToFront() $formWelcome.Refresh() } [Windows.Forms.Application]::DoEvents()
Thanks very much for this, I appreciate it! Definitely helps me in the right direction while learning more about how this all works. I have a better understanding of how to use the extensions file now too so I don’t have to make so many edits to the main file when a new version is released.
Hi
I know that its an old post but i need some help. I’m new to PSA and i’m not a PS expert.
Could you share your final scripts or provide some guidance in how to add the functions, extension and how to call them to get the remind me later option to work?
Thank you
Hey folks! So, this is a bit of a necro post, and not yet 3.8.4 tested or likely compatible, but I had the same question as Zack last year and reached out to Josiah for a second pair of eyes on where I thought he was going. With many thanks to him, what we settled on and what my group is using is the following function overload that we insert into AppDeployToolkitExtensions.ps1. In our circumstance we have to use this because we’re not in SCCM, so 1618 Fast Retry is not available (and as a result the great deferral functions and params can’t be used, only long enforced deadlines).
Hopefully this gives future scripters a more complete view of what was in discussion and what was the pre-3.8.4 method to inject a “remind” button that some of us were using. It’s a great addition to the toolkit!
Can’t post it directly here due to character limit, but here it is nonetheless: PSADT Show-WelcomePrompt function overload for <3.8.4 · GitHub
It will not be compatible with 3.8.4 as it was modified visually and functionally, BUT you can have Show-InstallationWelcome and Show-Welcomeprompt in the extension under a bit different name and use those instead of default ones. BUT i should caution you that we fixed a nasty bug in v 3.8.4 with closing apps not working correctly so that should probably be added. Also, we plan to have a new UI in v4 so this is probably not a good long-term solution.
Someone created this for latest psadt ?
no. You’ll have to modify this yourself.
ok will do so since I and i guess all Intune users would like to have it
EDIT: did create an update on the WelcomePrompt for usage in Intune. Defer os not an option there, so this prompt would be better I guess. Will post it soon after I tested it.