Delete DisableSmartScreenStore.cs
This commit is contained in:
parent
bad94b46d9
commit
ceb38bf82f
1 changed files with 0 additions and 57 deletions
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue