Open stephendpmurphy opened 4 years ago
Did you check the related issue: https://github.com/Squirrel/Squirrel.Windows/issues/761 ?
Does your registry value DisplayIcon
at HKEY_CURRENT\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\serial_dev
show the correct path? You can e.g. check with windows builtin regedit.exe.
I'm currently embedding my icon as https://github.com/Squirrel/Squirrel.Windows/issues/761#issuecomment-380720836 suggests and stumbled across your issue :)
I stumbled upon this issue when researching my own issue over at electron-forge: https://github.com/electron-userland/electron-forge/issues/2569
What you describe here seems to be in line with my findings.
That the taskbar-icon shows up in development, but not in the deployed version is probably because you set it through Electron's new BrowserWindow
or .setIcon
functionality which seems to be broken in production builds (that's what my issue was about).
The edit/adendum section of my issue covers your other findings:
iconUrl
to feed NuGet's (deprecated!) iconUrl property that handles this.setupIcon
-property of the Squirrel maker (even though I don't see it in you config-snippet above). This will cause electron/windows-installer
to insert the icon into the installers executable and as such it will show up in the taskbar during installation / first run.I assume you use mongodb-js/electron-squirrel-startup
(implicitly) to create the desktop- and startmenu shortcuts.
Anyway, nothing is setting the icon on the app's executable, so on n-th run the icon doesn't show up in the taskbar. (since also setting it in Electron itself is broken as per my issue).
There are a few ways this would start to work as expected:
electron/windows-installer
could use rcedit to insert the iconUrl
into the app's executable, the same way it inserts setupIcon
into the installers executablemongodb-js/electron-squirrel-startup
could use the uninstall-icon or the iconUrl
in the creation of the desktop- and startmenu shortcuts (as in this abandoned PR: mongodb-js/electron-squirrel-startup#10I don't understand why 1 or 2 or both aren't already implemented this way. It's all a rather confusing situation.
I don't have a solution for you, but I hope this will generate some insights.
@karimayachi thanks for at least continuing the discussion and posting your findings. This issue is rather stale and I haven't touched the source in a minute. I had transitioned to creating .msi installers (I had a need to install on corporate networks and this install flow fit better than the Squirrel installer) so I also lost the need to solve this problem.
I'm still interested in finding the solution however since I prefer the seamless Squirrel installer method.
I am running into this issue here too. As this is now open for 1.5 years and a "correct start menu icon" seems likly to be affecting everyone who creates windows installers, I was wondering if there is any update to this issue.
it is not working for me as well only on the shortcut level , but in the program files and stuff it is working ,
you might wanna check how to reset icons on windows because it sometimes caches.
https://www.makeuseof.com/windows-rebuild-icon-cache/.
but that does not fix the desktop icon issue.
Hi all :wave:
I am using Electron Forge (specifically the @electron-forge/maker-squirrel module) to create an installer package for a Win32 architecture. I apologize if this is not the correct place for this issue, but I know "windows-installer" is the underlying module used by Electron Forge which is why I'm here.
I have successfully packaged the application and can install/uninstall it from my machine no problem. However, I have some issues with the Start Menu, Taskbar, and Desktop Shortcut icons.
1.) Executing the app using my
npm start (electron-forge start)
script2.) First time installing the application using the packaged "app_setup.exe", followed by the application opening for the first time
3.) nth time executing the app, using the Start Menu or Desktop Shortcut (Not the first time)
Package versions
electron version: 10.1.4 maker-squirrel version: 6.0.0-beta.54
maker-squirrel config
Install directory
SquirrelSetup Contents