Remove message at end of install

Hey folks… We don’t want a message at the end of an install letting users know that it’s finished. How can I prevent that from showing up.

I already commented the following lines, but it just makes the initial window stay put and not go away.

## Display a message at the end of the install
# If (-not $useDefaultMsi) { Show-InstallationPrompt -Message 'Your mapped network drives have been removed.' -ButtonRightText 'OK' -Icon Information -NoWait }

Any ideas? Thanks!
-A

do you mean the balloon tip from the system tray?

no. the main window that displays at the end of the install

It’s probably one of those Show- commands after your code that is part of the sample script.
Just look for that and comment it out.

Yep. I’ve done that. as mentioned above I commented out the 2nd line, but it just causes the main window that pops up during thea ctual install to hang, and never go away.

If your installation code is something close to this below, I don’t know what to tell you:

...
		##* INSTALLATION
		##*===============================================
		[string]$installPhase = 'Installation'

		## Handle Zero-Config MSI Installations
#		If ($useDefaultMsi) {
#			[hashtable]$ExecuteDefaultMSISplat =  @{ Action = 'Install'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
#			Execute-MSI @ExecuteDefaultMSISplat; If ($defaultMspFiles) { $defaultMspFiles | ForEach-Object { Execute-MSI -Action 'Patch' -Path $_ } }
#		}

		## <Perform Installation tasks here>
		#your code here without using Show-XXXX stuff

		##*===============================================
		##* POST-INSTALLATION
		##*===============================================
		[string]$installPhase = 'Post-Installation'

		## <Perform Post-Installation tasks here>

		## Display a message at the end of the install
#		If (-not $useDefaultMsi) { Show-InstallationPrompt -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 }
	}
	ElseIf ($deploymentType -ieq 'Uninstall')
...
	{
		##*===============================================
		##* PRE-UNINSTALLATION

There was a guy here recently, exactly the same issue. You need to set the $appName variable.

You’re making this way too complicated… unless I’m misunderstanding your question. Don’t comment out the entire row… Literally all you have to do is comment out the command itself like below:

## Display a message at the end of the install
If (-not $useDefaultMsi) { <#Show-InstallationPrompt -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#> }
1 Like