fix: outdated execution path for COM activation#50471
Merged
VerteDinde merged 2 commits intoelectron:mainfrom Mar 26, 2026
Merged
fix: outdated execution path for COM activation#50471VerteDinde merged 2 commits intoelectron:mainfrom
VerteDinde merged 2 commits intoelectron:mainfrom
Conversation
VerteDinde
approved these changes
Mar 26, 2026
Member
VerteDinde
left a comment
There was a problem hiding this comment.
Code looks good and testing looks good to fix the original shortcut issue 👍
|
Release Notes Persisted
|
Contributor
|
I was unable to backport this PR to "39-x-y" cleanly; |
This was referenced Mar 26, 2026
Contributor
|
I have automatically backported this PR to "42-x-y", please check out #50517 |
Contributor
|
I have automatically backported this PR to "40-x-y", please check out #50518 |
Contributor
|
I have automatically backported this PR to "41-x-y", please check out #50519 |
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.
Description of Change
I identified a problem with missing icons on Windows. Electron PR /pull/48132 introduced COM activation. COM activation requires the ToastCLSID to be stored in a shortcut in the start menu. The PR enforces that shortcut creation. see EnsureShortcut()

Unfortunately this is not compatible with Squirrel auto-updating. The shortcut in
C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programsis created with the current executable. E.g.C:\Users\<user>\AppData\Local\my-app\app-1.0.0\myapp.exeAn update will kick in and the new version isC:\Users\<user>\AppData\Local\my-app\app-2.0.0\mayapp.exeThe shortcut will never be updated butC:\Users\<user>\AppData\Local\my-app\app-1.0.0\mayapp.exewill be deleted when the next update comes in. Now the shortcut is dead and eventually Explorers icon cashing catches up to the missing exe and the shortcut and the executable no longer shows an icon in the taskbar.This PR should fix this.
However there are still some fundamental problems that are not addressed but would need some rethinking and API changes.
Checklist
npm testpassesRelease Notes
Notes: Fixed an issue where an app shortcut may lose its icon after auto-updating on Windows.