Skip to content

Instantly share code, notes, and snippets.

@nazwadi
Created November 24, 2016 04:30
Show Gist options
  • Save nazwadi/d025edd6e56859c092a36218e307a90b to your computer and use it in GitHub Desktop.
Save nazwadi/d025edd6e56859c092a36218e307a90b to your computer and use it in GitHub Desktop.
Windows Display Notify Icon (Toast)
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon
$objNotifyIcon.Icon = "C:\Users\Nathan\registry.ico"
$objNotifyIcon.BalloonTipIcon = "Error"
$objNotifyIcon.BalloonTipText = "A change has been detected in your registry autostart keys."
$objNotifyIcon.BalloonTipTitle = "Autostart Registry Key Added"
$objNotifyIcon.Visible = $True
$objNotifyIcon.ShowBalloonTip(10000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment