If the user pins to the TaskBar Uninstall will not work
Issue noticed with 1.2.3 Win 7 64
- Application installed, and updates
- User runs the app from the desktop (which points to Update.exe)
- User then click on taskbar icon of running app, and selects "Pin this program to the taskbar"
- If the user trys to Uninstall from "Program and Features", it doesn't
- If the user unpins from the taskbar, the uninstall will work as expected.
as Issue #123 says - The Icon on the taskbar will be tied to the previous version once updated.
Is what is on the desktop a shortcut pointing to update.exe (%localappdata%\YourApp\Update.exe --processStart YourApp.exe)? Can they right click that shortcut and pin to taskbar? Cheers.
Right now you need to remove pinned shortcuts yourself on uninstall but tbh Squirrel should just do this
The user pins the running app.... so it is "YourApp.exe"
I notice the upgrade (within the Squirrel code) resets the shortcuts to the new version.
The issue is just if the user wants to run Uninstall from Programs and Features. If they leave the pinned app... the uninstall does not work.
I suppose we can write an uninstall function within "YourApp.exe" that calls the Squirrel API, but that seems less than optimal (as it would become an application feature, rather than an OS feature.)
What do you mean by "the uninstall doesn't work"
- Open programs and features from control panel
- Locate the installed "YourApp" in the list
- Right Click - Uninstall is the only option
- Click Uninstall
- Short spinning icon, then nothing - program is still there
- Un Pin from the task bar, and repeat (attempt uninstall process again)
- Uninstall works, and the program disappears from the list in Programs and features.
"Doesn't work" means - the item remains installed, remains in the list of programs, and the reason it is not uninstalled is not clear to the user (no dialog or popup)
SquirrelSetup.log contains a stack trace It seems to be looking for version 255.255.255.255
- the Short version is... (redacted exe and program names)
LogHost: Really couldn't delete file: C:\Users\BobTest\AppData\Local\Company\app-255.255.255.255\YourApp.exe: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\BobTest\AppData\Local\Company\app-255.255.255.255\YourApp.exe'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at System.IO.File.Delete(String path)
at Squirrel.Utility.<>c__DisplayClass31_0.<DeleteFileHarder>b__0()
at Squirrel.Utility.<>c__DisplayClass8_0.<Retry>b__0()
at Squirrel.Utility.Retry[T](Func`1 block, Int32 retries)
at Squirrel.Utility.Retry(Action block, Int32 retries)
at Squirrel.Utility.DeleteFileHarder(String path, Boolean ignoreIfFails)
2016-02-16 10:55:38> IEnableLogger: Failed to delete outdated pinned shortcut to: C:\Users\BobTest\AppData\Local\Company\app-255.255.255.255\YourApp.exe: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\BobTest\AppData\Local\Company\app-255.255.255.255\YourApp.exe'.
2016-02-16 10:55:38> Unhandled exception: System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Squirrel.Shell.ShellLink.get_Target()
at Squirrel.UpdateManager.ApplyReleasesImpl.fixPinnedExecutables(SemanticVersion newCurrentVersion)
at Squirrel.UpdateManager.ApplyReleasesImpl.<FullUninstall>d__3.MoveNext()
Fixed by #604