When using Show-ADTInstallationPrompt and specify timeout, the countdown is not shown on the pop up for the user. Is it possible to add that? Like for Show-ADTInstallationWelcome function?
When using Show-ADTInstallationWeclome, custom message can be specified in strings.psd1 Can be there be a possibility to overwrite the custom message in script directly?
I see that the framework supports multiple languages, where it can identify the operating system language and display messages accordingly.
These files are located in the PSAppDeployToolkit_Template_v4\Strings\language directory.
The PSAppDeployToolkit_Template_v4\Config\config.psd1 file has the automatic or default language.
I’m using the automatic language for identification. ($null)
My question is, how do I use the language variables? For example, I want to display the “Complete” message, but it would need to be translated according to the language.
Example:
Post-Install (Show-ADTInstallationPrompt)
How I use the “message” according of the strings.psd1 ?
##================================================
## MARK: Post-Install
##================================================
$adtSession.InstallPhase = "Post-$($adtSession.DeploymentType)"
## <Perform Post-Installation tasks here>
$config = Get-ADTConfig
## Display a message at the end of the install.
if (!$adtSession.UseDefaultMsi)
{
Show-ADTInstallationPrompt -Message 'You can customize text to appear at the end of an install or remove it completely for unattended installations.' -ButtonRightText 'OK' -Icon Information -NoWait
}
There seems to be a lot of piling of questions from everyone here. If you’ve got a separate issue, please create a new post!
The timeout for this prompt is for how long to wait for a response before returning “Timeout” and continuing with your script. There’s no visible timeout for this dialogue.
Because of our support for translated languages, there’s no provision to specify hard-coded text within the code itself. Please specify it in strings.psd1.
If you’re on an English operating system and want to display it in German, you’d set this value to de-DE, or simply de would do also.
The button text you specify is the return result from the function. So:
if ((Show-ADTInstallationPrompt -Message ‘test ?’ -ButtonRightText ‘Yes’ -ButtonLeftText ‘No’) -eq ‘No’)
{
Write-ADTLogEntry -Message “User cancelled the prompt.” -Severity Warning
Close-ADTSession -ExitCode 70001 # (or some value that’s beneficial to you)
}