Delete DisableCompTelemetry.cs

This commit is contained in:
Belim 2020-09-20 19:23:35 +02:00 committed by GitHub
parent ad9ff3880a
commit 00ed6a1b43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,58 +0,0 @@
using Microsoft.Win32;
namespace Privatezilla.Setting.Privacy
{
internal class DisableCompTelemetry : SettingBase
{
private const string TelemetryKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\CompatTelRunner.exe";
private const string DesiredValue = @"%windir%\System32\taskkill.exe";
public override string ID()
{
return Properties.Resources.settingsPrivacyDisableCompTelemetry;
}
public override string Info()
{
return Properties.Resources.settingsPrivacyDisableCompTelemetryInfo;
}
public override bool CheckSetting()
{
return !(
RegistryHelper.StringEquals(TelemetryKey, "Debugger", DesiredValue)
);
}
public override bool DoSetting()
{
try
{
Registry.SetValue(TelemetryKey, "Debugger", DesiredValue, RegistryValueKind.String);
return true;
}
catch
{ }
return false;
}
public override bool UndoSetting()
{
try
{
var RegKey = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\CompatTelRunner.exe", true);
RegKey.DeleteValue("Debugger");
return true;
}
catch
{ }
return false;
}
}
}