/// <summary> /// Removes registry keys under HKCU/SOFTWARE/OpenLiveWriter and deletes the AppData and Roaming profiles. /// </summary> /// <param name="mgr">An instance of Squirrel.UpdateManager to be used as helper class.</param> private static async void OnAppUninstall(IUpdateManager mgr) { await mgr.FullUninstall(); string OLWRegKey = @"SOFTWARE\OpenLiveWriter"; Registry.CurrentUser.DeleteSubKeyTree(OLWRegKey); mgr.RemoveShortcutForThisExe(); mgr.RemoveUninstallerRegistryEntry(); Directory.Delete(ApplicationEnvironment.LocalApplicationDataDirectory, true); Directory.Delete(ApplicationEnvironment.ApplicationDataDirectory, true); }
private void Initialize() { var url = $"{UpdateUrl}/Squirrel/NetFx"; _currentVersion = Assembly.GetEntryAssembly().GetName().Version.ToString(); _updateManager = new UpdateManager(url, urlDownloader: new FileDownloader()); SquirrelAwareApp.HandleEvents( onInitialInstall: v => _updateManager.CreateShortcutForThisExe(), onAppUpdate: v => _updateManager.CreateShortcutForThisExe(), onAppUninstall: v => _updateManager.RemoveShortcutForThisExe() ); }
private void PerformUninstallActions() { log.Info(UninstalledZapp, "User uninstalled Zapp."); updateManager.RemoveShortcutForThisExe(); registryManager.RemoveEntryToLaunchOnStartup(); }