-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDefaultInstallerUninstallSystem.cs
More file actions
33 lines (26 loc) · 1.02 KB
/
Copy pathDefaultInstallerUninstallSystem.cs
File metadata and controls
33 lines (26 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System.IO;
namespace DataGateWin.Installer;
internal sealed class DefaultInstallerUninstallSystem : IInstallerUninstallSystem
{
public string? TryGetInstallLocation() =>
InstallRegistry.TryGetInstallLocation();
public Task StopAppProcessesAsync(bool quiet, Action<string> log, CancellationToken cancellationToken) =>
ProcessStopCoordinator.EnsureAppProcessesStoppedAsync(interactivePrompts: !quiet, log);
public void RecoverStaleDnsSettings(Action<string> log) =>
WindowsDnsRecovery.RecoverStaleDnsState(log);
public void DeleteShortcuts()
{
ShortcutHelper.RemoveStartMenuShortcut();
ShortcutHelper.RemoveDesktopShortcut();
}
public void RemoveRegistryEntries()
{
InstallRegistry.UnregisterUninstallEntry();
InstallRegistry.UnregisterAppPaths();
}
public void DeleteInstallDirectory(string installDirectory)
{
if (Directory.Exists(installDirectory))
Directory.Delete(installDirectory, recursive: true);
}
}