Skip to content

Commit

Permalink
Merge pull request #50 from Cereal-Killa/fix-no-auto-update
Browse files Browse the repository at this point in the history
Fix for no auto update
  • Loading branch information
Belim committed May 8, 2021
2 parents bd70c68 + 481d3c2 commit b7e79c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Privatezilla/Settings/Updates/DisableUpdates.cs
Expand Up @@ -23,7 +23,7 @@ public override string Info()
public override bool CheckSetting()
{
return !(
RegistryHelper.IntEquals(NoAutoUpdate, "NoAutoUpdate",0) &&
RegistryHelper.IntEquals(NoAutoUpdate, "NoAutoUpdate", 1) &&
RegistryHelper.IntEquals(AUOptions, "AUOptions", 2) &&
RegistryHelper.IntEquals(ScheduledInstallDay, "ScheduledInstallDay", 0) &&
RegistryHelper.IntEquals(ScheduledInstallTime, "ScheduledInstallTime", 3)
Expand All @@ -34,7 +34,7 @@ public override bool DoSetting()
{
try
{
Registry.SetValue(NoAutoUpdate, "NoAutoUpdate", 0, RegistryValueKind.DWord);
Registry.SetValue(NoAutoUpdate, "NoAutoUpdate", 1, RegistryValueKind.DWord);
Registry.SetValue(AUOptions, "AUOptions", 2, RegistryValueKind.DWord);
Registry.SetValue(ScheduledInstallDay, "ScheduledInstallDay", 0, RegistryValueKind.DWord);
Registry.SetValue(ScheduledInstallTime, "ScheduledInstallTime", 3, RegistryValueKind.DWord);
Expand All @@ -50,7 +50,7 @@ public override bool UndoSetting()
{
try
{
Registry.SetValue(NoAutoUpdate, "NoAutoUpdate", 1, RegistryValueKind.DWord);
Registry.SetValue(NoAutoUpdate, "NoAutoUpdate", 0, RegistryValueKind.DWord);

var RegKey = Registry.LocalMachine.OpenSubKey(@"Software\Policies\Microsoft\Windows\WindowsUpdate\AU", true);
RegKey.DeleteValue("AUOptions");
Expand All @@ -66,4 +66,4 @@ public override bool UndoSetting()
}

}
}
}

0 comments on commit b7e79c9

Please sign in to comment.