Delete UpdatesSharing.cs
This commit is contained in:
parent
51a7a58ba8
commit
9a0cc16aea
1 changed files with 0 additions and 56 deletions
|
@ -1,56 +0,0 @@
|
||||||
using Microsoft.Win32;
|
|
||||||
|
|
||||||
namespace Privatezilla.Setting.Updates
|
|
||||||
{
|
|
||||||
internal class DisableUpdatesSharing : SettingBase
|
|
||||||
{
|
|
||||||
private const string SharingKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DeliveryOptimization";
|
|
||||||
private const int DesiredValue = 0;
|
|
||||||
|
|
||||||
public override string ID()
|
|
||||||
{
|
|
||||||
return Properties.Resources.settingsUpdatesUpdateSharing;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override string Info()
|
|
||||||
{
|
|
||||||
return Properties.Resources.settingsUpdatesUpdateSharingInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool CheckSetting()
|
|
||||||
{
|
|
||||||
return !(
|
|
||||||
RegistryHelper.IntEquals(SharingKey, "DODownloadMode", DesiredValue)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool DoSetting()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Registry.SetValue(SharingKey, "DODownloadMode", DesiredValue, RegistryValueKind.DWord);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{ }
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool UndoSetting()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var RegKey = Registry.LocalMachine.OpenSubKey(@"Software\Policies\Microsoft\Windows\DeliveryOptimization", true);
|
|
||||||
RegKey.DeleteValue("DODownloadMode");
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{ }
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue