Repository navigation
Show Windows notifications as Claudiu's, with its icon, not PowerShell's - #120
Merged
Merged
Conversation
notify-rust sends a Windows notification under PowerShell's app ID unless it is given one, so notifications from the installed app were titled Windows PowerShell. The installed app now sends them under the app ID its Start menu shortcut carries, which Velopack reads from the install (`velopack.Claudiu`). A dev build has no install and no shortcut, so it keeps PowerShell's, the only ID Windows will show for it.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The shortcut's app ID is enough for Windows to name the app in a notification, but not to show its icon. Before its first notification, the installed app now registers its app ID under HKCU\Software\Classes\AppUserModelId with the name Claudiu and an icon copied into the data folder, which an update leaves in place.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On Windows, Claudiu's notifications came from "Windows PowerShell". notify-rust sends a notification under PowerShell's app ID unless it is given one. The installed app now sends them under the app ID its Start menu shortcut carries, which Velopack reads from the install manifest (
velopack.Claudiu). A dev build has no install and no shortcut, so it keeps PowerShell's, the only ID Windows will show for it.The app ID alone names the app but leaves the header without an icon. Before its first notification, the installed app registers the ID under
HKCU\Software\Classes\AppUserModelId�elopack.ClaudiuwithDisplayNameClaudiu and anIconUri. TheIconUripoints at the icon copied into the data folder, which an update leaves in place.Evidence
System.AppUserModel.IDisvelopack.Claudiu, andsq.versionhas<shortcutAumid>velopack.Claudiu</shortcutAumid>.current\claudiu.exepath the way the installed app does, gotvelopack.Claudiu, and sent a notification under it. Windows showed it headed "Claudiu", with no icon at first. With the code's own registration in place, the header showed Claudiu's icon.cargo clippy -D warningsis clean.Not checked: a notification from an installed build of this branch, since that needs a release.
Risk
If Velopack can't find the install, notifications fall back to PowerShell's ID, as before. Uninstalling Claudiu leaves the registry key and the icon file behind. Revert this commit to undo it.