Skip to content

Commit

Permalink
Merge PR #1086
Browse files Browse the repository at this point in the history
  • Loading branch information
anaisbetts committed Jul 10, 2017
2 parents 9390715 + 2c7c559 commit b25c9fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Squirrel/UpdateManager.ApplyReleases.cs
Original file line number Diff line number Diff line change
Expand Up @@ -511,12 +511,15 @@ internal void unshimOurselves()
baseKey = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, view);
regKey = baseKey.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers");
if (regKey == null) return;
var toDelete = regKey.GetValueNames()
.Where(x => x.StartsWith(rootAppDirectory, StringComparison.OrdinalIgnoreCase))
.ToList();
toDelete.ForEach(x =>
this.Log().LogIfThrows(LogLevel.Warn, "Failed to delete key: " + x, () => regKey.DeleteValue(x)));
this.Log().LogIfThrows(LogLevel.Warn, "Failed to delete key: " + x,
() => regKey.DeleteValue(x)));
} catch (Exception e) {
this.Log().WarnException("Couldn't rewrite shim RegKey, most likely no apps are shimmed", e);
} finally {
Expand Down

0 comments on commit b25c9fa

Please sign in to comment.