All I want to do is two things with my “ClosePrompt_ButtonClose” button:
Move it to the middle
Make it bigger so it can fit more text
Any idea how to do this? I am looking at the “Show-WelcomePrompt” function in the AppyDeployToolkitMain.ps1 but I am not sure what needs to be modified.
I found this thread researching the topic but I still need a hand:
I’m guessing your code is something like this: Show-InstallationWelcome -CloseApps 'outlook'
As for modifying the GUI, Show-InstallationWelcome uses the Show-WelcomePrompt function to actually display the GUI.
The text for the [Close Apps] Button is contained inside $configClosePromptButtonClose as per line: $buttonCloseApps.Text = $configClosePromptButtonClose
The contents (aka text) of $configClosePromptButtonClose is set via the XML file using this code near the beginning of AppDeployToolkitMain.ps1:
$buttonCloseApps.Location = New-Object -TypeName 'System.Drawing.Point' -ArgumentList 160,4 #these values modify the x,y axis so I changed them from 14,4
Then, in order to make my button bigger what I did was modify the “$buttonSize” variable (because the $buttonCloseApps.MinimumSize receives it’s value from it) to the following:
$buttonSize = New-Object -TypeName 'System.Drawing.Size' -ArgumentList 160,24 #modifying these two values changes the height and width with the default being 130,24
This worked perfectly because I am only using one button anyway: