As a Electron-App user, I would like my pinned Taskbar icon to still work after updating, so I can quickly use my app after updates and reduce time spent pinning the icon to my Taskbar after every update.
When you do auto-update, it installs it in a new folder, deletes the old folder, and leaves the pinned Taskbar icon referencing a folder that doesn't exist.
### User side:
1. user has electron app on Windows Taskbar.
2. User runs electron app on 2.0.21. It is installed in C:\Program Files\electron-app\2.0.21\electron-app.exe
3. User boots up the app.
4. User gets install prompt. Accepts it.
5. The app downloads.
### Electron-App:
* Creates a new folder 2.0.22.
* Installs Electron-app in the 2.0.22.
* Deletes folder 2.0.21.
* leaves the dock icon referencing a folder and .exe that doesn't exist.
When you do an auto-update, the pinned Taskbar icon continues to work.
Currently Electron-App structure is: Program_Files\Electron-App-NameVersion\Electron-App.exe
Uninstalling is easy because it uninstalls the entire Version folder.
Move the .exe outside of the version folder?
Electron-App Structure:
Note: The above proposal is just a suggestion, I am open to whatever the best technical implementation is (I trust you know better than me).
References: #884
Solution: Since you should use asar, it is ok to not create folder per version.
@develar: I upgraded to v10.2.0, but my application is still being unpinned during upgrade.
@bontibon Were both versions (old and new) built by 10.2.0?
@develar: Yes; I just re-ran the same installer.
I can confirm on Windows 10 I am also experiencing this issue. Upon closing my application when a update will be installed the pin is removed (cleaned up by the NSIS installer?). When manually executing the installer I get the same behavior.
UninstShortcut calls IStartMenuPinnedList::RemoveFromList which removes the shortcut from being pinned in both the start menu and the taskbar.
Since the updater effectively runs the old uninstall and the new installer this is being called. If the paths are no longer being changed upon update (and the updater should check that, since the new installer could use a different directory) the portion of the uninstall where shortcuts are removed and reinstalled could be skipped when updating.
Hi! Is there any workaround for this issue?
Can confirm this problem.
Fixed (If allowToChangeInstallationDirectory is not set to true). Thanks to @MariaDima
We are still experiencing this issue in Windows
"devDependencies": {
"electron": "2.0.14",
"electron-builder": "20.31.2"
},
"nsis": {
"oneClick": true,
"perMachine": false,
"include": "build/nsis-scripts/installer.nsh"
},
"msi": {
"oneClick": true,
"perMachine": true,
"runAfterFinish": false
}
Is it broken again?
Actually it's a diff issue. It does not keep old short cut but it deletes old pinned icon on every upgrade. so looks like a diff issue.
Most helpful comment
Fixed (If
allowToChangeInstallationDirectoryis not set totrue). Thanks to @MariaDima