I placed the Show-InstallationWelcome inside the PRE-UNINSTALLATION block. Went that line is ran in the uninstall process it says “The following application is about to be installed” and I would like it to say “The following application is about to be uninstalled” instead
I have not tested this yet but if I edit this, then I still have a problem because it is not dynamic I assume. If I edit this to say “uninstall,” then during the installation when I use Show-InstallationWelcome, it will say “uninstall” during the installation phase.
<!-- Text displayed when counting down to automatically closing applications. -->
<DeferPrompt_WelcomeMessage>The following application is about to be installed:</DeferPrompt_WelcomeMessage>
<!-- Text displayed when only the deferral dialog is to be displayed and there are no applications to close. -->
<DeferPrompt_ExpiryMessage>You can choose to defer the installation until the deferral expires:</DeferPrompt_ExpiryMessage>
I just tested this and this does not work because every time I run the install block, it will now say “uninstall” instead of “install” in the text. I need this to by dynamic. I hope that makes sense.
The reason for this is that when it is installing or uninstalling, it is still saying “install” and “installation” in the text which I do not want to confuse our users.
From this, we now know that the message you see in GUI is stored in the $configDeferPromptWelcomeMessage variable.
To use it for your needs, add something like the following code before you launch the uninstall in your “PRE-UNINSTALLATION block”:
$Backup_DeferPromptWelcomeMessage = $configDeferPromptWelcomeMessage
$configDeferPromptWelcomeMessage = "This is an uninstallation during the installation NetDocuments."
AppDeployToolkitConfig.xml - added below code, along with what’s already there for Installation. Just make sure you’re placing it properly.
<!-- ######################################################################################################-->
<!-- Modifying uninstall text messages-->
<ClosePrompt_UninstallButtonDefer>Defer the Uninstallation</ClosePrompt_UninstallButtonDefer>
<!-- Text displyed on the defer button when prompting to close running programs during uninstallation. -->
<DeferPrompt_UninstallWelcomeMessage>The following application is about to be uninstalled.</DeferPrompt_UninstallWelcomeMessage>
<!-- Uninstall message modified. -->
<DeferPrompt_UninstallExpiryMessage>You can choose to defer the uninstallation until the deferral expires:</DeferPrompt_UninstallExpiryMessage>
<!-- Uninstall message modified. -->
<!-- ######################################################################################################-->
AppDeployToolkitMain.ps1 - Now let’s add the new xml info in our Main.ps1 file so it can be recognized because just having it in XML file won’t do anything.
This way whenever I run Uninstall script, I don’t have to change the text in GUI. If you use Repair then you can do the same and then just introduce it in Main.ps1.
Let me know if you have any questions, hope it helps