Being relatively new to PowersShell I’m a lost. I have manage to customize most of my form bot would like to remove the “Continue” button and move over the “Defer” button in its place. This is what my form looks like so far;
You’d have to change the “Location” for the desired button you’re working with. Like left, middle or right button within the function. So in the “AppDeployToolkitMain.ps1” file search for the prompt you’re using like “show-installationwelcome” and within that function search for the form buttons. Adjust the location as needed.
Which function are you using here?
I’m guessing your code is something like this: Show-InstallationWelcome -CloseApps 'outlook' -AllowDefer -DeferTimes 3
As for modifying the GUI, Show-InstallationWelcome uses the Show-WelcomePrompt function to actually display the GUI.
The text for the [Defer] Button is contained inside $configClosePromptButtonDefer as per this line: $buttonDefer.Text = $configClosePromptButtonDefer
The text for the [Close Apps] Button is contained inside $configClosePromptButtonClose as per line: $buttonCloseApps.Text = $configClosePromptButtonClose
The contents of both $configClosePromptButtonDefer and $configClosePromptButtonClose are set via the XML file using this code near the beginning of AppDeployToolkitMain.ps1:
If you can understand all this, you will notice the surrounding code in the Show-WelcomePrompt function that will allow you to move and remove the buttons as you wish.