Delete DisableSmartScreenStore.cs

This commit is contained in:
Belim 2020-09-20 19:22:25 +02:00 committed by GitHub
parent bad94b46d9
commit ceb38bf82f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,57 +0,0 @@
using Microsoft.Win32;
namespace Privatezilla.Setting.Defender
{
internal class DisableSmartScreenStore: SettingBase
{
private const string DefenderKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\AppHost";
private const int DesiredValue = 0;
public override string ID()
{
return Properties.Resources.settingsDefenderDisableSmartScreenStore;
}
public override string Info()
{
return Properties.Resources.settingsDefenderDisableSmartScreenStoreInfo;
}
public override bool CheckSetting()
{
return !(
RegistryHelper.IntEquals(DefenderKey, "EnableWebContentEvaluation", DesiredValue)
);
}
public override bool DoSetting()
{
try
{
Registry.SetValue(DefenderKey, "EnableWebContentEvaluation", DesiredValue, RegistryValueKind.DWord);
return true;
}
catch
{ }
return false;
}
public override bool UndoSetting()
{
try
{
var RegKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\AppHost", true);
RegKey.DeleteValue("EnableWebContentEvaluation");
return true;
}
catch
{ }
return false;
}
}
}