mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Add a method to remove the registry key
This commit is contained in:
@@ -66,6 +66,12 @@ namespace Squirrel
|
|||||||
/// <param name="quietSwitch">The switch for silent uninstall, usually --silent</param>
|
/// <param name="quietSwitch">The switch for silent uninstall, usually --silent</param>
|
||||||
/// <returns>The registry key that was created</returns>
|
/// <returns>The registry key that was created</returns>
|
||||||
Task<RegistryKey> CreateUninstallerRegistryEntry(string uninstallCmd, string quietSwitch);
|
Task<RegistryKey> CreateUninstallerRegistryEntry(string uninstallCmd, string quietSwitch);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes the entry in Programs and Features created via
|
||||||
|
/// CreateUninstallerRegistryEntry
|
||||||
|
/// </summary>
|
||||||
|
void RemoveUninstallerRegistryEntry();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class EasyModeMixin
|
public static class EasyModeMixin
|
||||||
|
|||||||
@@ -145,6 +145,13 @@ namespace Squirrel
|
|||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void RemoveUninstallerRegistryEntry()
|
||||||
|
{
|
||||||
|
var key = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Default)
|
||||||
|
.OpenSubKey(uninstallRegSubKey);
|
||||||
|
key.DeleteSubKeyTree(applicationName);
|
||||||
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
var disp = Interlocked.Exchange(ref updateLock, null);
|
var disp = Interlocked.Exchange(ref updateLock, null);
|
||||||
|
|||||||
Reference in New Issue
Block a user