OldSquirrelForWindows
OldSquirrelForWindows copied to clipboard
On second update, the icon disappears
Repro steps:
- Install application version N (icon on desktop)
- Create delta package for N+1
- Apply update to running app (icon still on desktop)
- Create delta package for N+2
- Apply update to running app
Expected: icon is still there (points to N+2 version)
Actual: icon is deleted
Something something eureka!
DEBUG | 2013-09-05 11:56:11 AM +10 | UpdateManager: AppDomain ID: 1
WARN | 2013-09-05 11:56:11 AM +10 | InstallerHookOperations: Couldn't search directory for IAppSetups: C:\Users\brendanforster\AppData\Local\TestApp\app-1.10.0: System.UnauthorizedAccessException: Access to the path 'C:\Users\brendanforster\AppData\Local\TestApp\app-1.10.0' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption)
at System.IO.DirectoryInfo.GetFiles(String searchPattern)
at System.IO.Abstractions.DirectoryInfoWrapper.GetFiles(String searchPattern)
at Shimmer.Client.InstallerHookOperations.findAppSetupsToRun(String appDirectory)
ERROR | 2013-09-05 11:56:11 AM +10 | InstallerHookOperations: Couldn't run cleanups: System.UnauthorizedAccessException: Access to the path 'C:\Users\brendanforster\AppData\Local\TestApp\app-1.10.0' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption)
at System.IO.DirectoryInfo.GetFiles(String searchPattern)
at System.IO.Abstractions.DirectoryInfoWrapper.GetFiles(String searchPattern)
at Shimmer.Client.InstallerHookOperations.findAppSetupsToRun(String appDirectory)
at Shimmer.Client.InstallerHookOperations.RunAppSetupCleanups(String fullDirectoryPath)
WARN | 2013-09-05 11:56:11 AM +10 | UpdateManager: Couldn't delete old app directory on next reboot: System.UnauthorizedAccessException: Access to the path 'C:\Users\brendanforster\AppData\Local\TestApp\app-1.10.0' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption)
at System.IO.DirectoryInfo.GetFiles()
at Shimmer.Core.Utility.DeleteDirectoryAtNextReboot(String directoryPath)
at Shimmer.Client.UpdateManager.<cleanUpOldVersions>b__51(DirectoryInfoBase oldAppRoot)
WARN | 2013-09-05 11:56:11 AM +10 | UpdateManager: Couldn't delete old app directory on next reboot: System.ComponentModel.Win32Exception (0x80004005): Access is denied
at Shimmer.Core.Utility.safeDeleteFileAtNextReboot(String name)
at Shimmer.Core.Utility.<DeleteDirectoryAtNextReboot>b__1c(FileInfo x)
at System.Linq.EnumerableExtensions.ForEach[TSource](IEnumerable`1 source, Action`1 onNext)
at Shimmer.Core.Utility.DeleteDirectoryAtNextReboot(String directoryPath)
at Shimmer.Client.UpdateManager.<cleanUpOldVersions>b__51(DirectoryInfoBase oldAppRoot)
WARN | 2013-09-05 11:56:11 AM +10 | UpdateManager: Couldn't delete old app directory on next reboot: System.ComponentModel.Win32Exception (0x80004005): Access is denied
at Shimmer.Core.Utility.safeDeleteFileAtNextReboot(String name)
at Shimmer.Core.Utility.<DeleteDirectoryAtNextReboot>b__1c(FileInfo x)
at System.Linq.EnumerableExtensions.ForEach[TSource](IEnumerable`1 source, Action`1 onNext)
at Shimmer.Core.Utility.DeleteDirectoryAtNextReboot(String directoryPath)
at Shimmer.Client.UpdateManager.<cleanUpOldVersions>b__51(DirectoryInfoBase oldAppRoot)
With a bit more tracing:
WARN | 2013-09-05 02:31:50 PM +10 | InstallerHookOperations: Could not find any AppSetup instances
INFO | 2013-09-05 02:31:50 PM +10 | InstallerHookOperations: We have an exe: C:\Users\brendanforster\AppData\Local\TestApp\app-1.23.0\TestApp.exe
INFO | 2013-09-05 02:31:50 PM +10 | InstallerHookOperations: Deleting shortcut: C:\Users\brendanforster\Desktop\TestApp.lnk
INFO | 2013-09-05 02:31:50 PM +10 | InstallerHookOperations: Deleting shortcut: C:\Users\brendanforster\AppData\Roaming\Microsoft\Windows\Start Menu\TestApp\TestApp.lnk
WARN | 2013-09-05 02:31:50 PM +10 | UpdateManager: Couldn't delete old app directory on next reboot C:\Users\brendanforster\AppData\Local\TestApp\app-1.23.0: System.ComponentModel.Win32Exception (0x80004005): Access is denied
at Shimmer.Core.Utility.safeDeleteFileAtNextReboot(String name)
at Shimmer.Core.Utility.<DeleteDirectoryAtNextReboot>b__1c(FileInfo x)
at System.Linq.EnumerableExtensions.ForEach[TSource](IEnumerable`1 source, Action`1 onNext)
at Shimmer.Core.Utility.DeleteDirectoryAtNextReboot(String directoryPath)
at Shimmer.Client.UpdateManager.<cleanUpOldVersions>b__51(DirectoryInfoBase oldAppRoot)
WARN | 2013-09-05 02:31:50 PM +10 | InstallerHookOperations: Could not find any AppSetup instances
INFO | 2013-09-05 02:31:50 PM +10 | InstallerHookOperations: We have an exe: C:\Users\brendanforster\AppData\Local\TestApp\app-1.24.0\TestApp.exe
INFO | 2013-09-05 02:31:50 PM +10 | InstallerHookOperations: Shortcut not found: C:\Users\brendanforster\Desktop\TestApp.lnk, capturing for future reference
INFO | 2013-09-05 02:31:50 PM +10 | InstallerHookOperations: Shortcut not found: C:\Users\brendanforster\AppData\Roaming\Microsoft\Windows\Start Menu\TestApp\TestApp.lnk, capturing for future reference
WARN | 2013-09-05 02:31:50 PM +10 | UpdateManager: Couldn't delete old app directory on next reboot C:\Users\brendanforster\AppData\Local\TestApp\app-1.24.0: System.ComponentModel.Win32Exception (0x80004005): Access is denied
at Shimmer.Core.Utility.safeDeleteFileAtNextReboot(String name)
at Shimmer.Core.Utility.<DeleteDirectoryAtNextReboot>b__1c(FileInfo x)
at System.Linq.EnumerableExtensions.ForEach[TSource](IEnumerable`1 source, Action`1 onNext)
at Shimmer.Core.Utility.DeleteDirectoryAtNextReboot(String directoryPath)
at Shimmer.Client.UpdateManager.<cleanUpOldVersions>b__51(DirectoryInfoBase oldAppRoot)
WARN | 2013-09-05 02:31:50 PM +10 | InstallerHookOperations: Could not find any AppSetup instances
INFO | 2013-09-05 02:31:50 PM +10 | InstallerHookOperations: We have an exe: C:\Users\brendanforster\AppData\Local\TestApp\app-1.25.0\TestApp.exe
This seems to be the flow:
- got a folder for version N - run uninstall and delete shortcuts
- got a folder for version N+1 - run uninstall - and the icons are not found, so blacklist
- run install for new version - icons are blacklisted :metal:
I'm going to punt this one for now as there's a couple of assumptions here I'm going against:
- the user should see a "restart the app" message after the first update
- the user should not have the option to update again after that first update