Skip to content

Commit b06f9aa

Browse files
committed
Set-NotifyIcon description
1 parent e13f093 commit b06f9aa

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Modules/Scripts/Set-NotifyIcon.ps1

+8-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ icon and notifications.
1414
Windows makes changes in memory and (over)writes changes to the Registry when explorer.exe
1515
shuts down, so if changes are made, they get overwritten. So the best approach is to terminate
1616
explorer.exe, run this script, and then start explorer.exe again.
17+
18+
Windows keeps track of all notify icons it's ever seen in HKCU:\Control Panel\NotifyIconSettings
19+
which can be queried like this:
20+
21+
Get-ChildItem -Path 'HKCU:\Control Panel\NotifyIconSettings' -Name | % { `
22+
(Get-ItemProperty -Path "HKCU:\Control Panel\NotifyIconSettings\$($_)" `
23+
-Name ExecutablePath).ExecutablePath } | select-object -unique | sort
1724
#>
1825

1926
# CmdletBinding adds -Verbose functionality, SupportsShouldProcess adds -WhatIf
@@ -94,7 +101,7 @@ Process
94101
#Write-Host $data
95102

96103
$path = EncodeProgramPath $ProgramPath
97-
#Write-Host $path
104+
#Write-Host $path
98105
#Write-Host ( $path.Split('00') | ? { $_.Length -gt 0 } | % { [char](Rot13 ([Convert]::ToByte($_, 16))) } )
99106

100107
if (-not $data.Contains($path))

0 commit comments

Comments
 (0)