Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Belim committed Oct 22, 2020
1 parent 19129c8 commit f30a1d2
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 4 deletions.
20 changes: 19 additions & 1 deletion src/Privatezilla/Locales/Locale.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/Privatezilla/Locales/Locale.resx
Expand Up @@ -677,6 +677,12 @@ Add translation credits here!</comment>
<value>This setting called "TargetReleaseVersionInfo" prevents Windows 10 feature updates from being installed until the specified version reaches the end of support.\nIt will specify your currently used Windows 10 version as the target release version of Windows 10 that you wish the system to be on (supports only Pro and enterprise versions).</value>
<comment>Settings &gt; Updates</comment>
</data>
<data name="settingsUpdatesDisableSafeguards" xml:space="preserve">
<value>Disable safeguards for Feature Updates</value>
</data>
<data name="settingsUpdatesDisableSafeguardsInfo" xml:space="preserve">
<value>Microsoft uses diagnostic data to determine whether devices that use Windows Update are ready for a feature update in order to ensure a smooth experience.\nWhen Microsoft determines a device is not ready to update due to a known issue, a safeguard hold (also known as a compatibility hold or update block) is generated to delay the device's upgrade and protect the end-user experience.\nThis setting will opt out of safeguard protections allowing you to bypass any feature upgrade blocks.</value>
</data>
<data name="settingsUpdatesDisableUpdates" xml:space="preserve">
<value>Disable forced Windows updates</value>
<comment>Settings &gt; Updates</comment>
Expand Down
1 change: 1 addition & 0 deletions src/Privatezilla/MainWindow.cs
Expand Up @@ -201,6 +201,7 @@ public void InitializeSettings()
new SettingNode(new Setting.Updates.DisableUpdates()),
new SettingNode(new Setting.Updates.DisableUpdatesSharing()),
new SettingNode(new Setting.Updates.BlockMajorUpdates()),
new SettingNode(new Setting.Updates.DisableSafeguards()),
});

// Settings > Gaming
Expand Down
1 change: 1 addition & 0 deletions src/Privatezilla/Privatezilla.csproj
Expand Up @@ -145,6 +145,7 @@
<Compile Include="Settings\Security\DisablePassword.cs" />
<Compile Include="Settings\Security\WindowsDRM.cs" />
<Compile Include="Settings\Updates\BlockMajorUpdates.cs" />
<Compile Include="Settings\Updates\DisableSafeguards.cs" />
<Compile Include="Settings\Updates\DisableUpdates.cs" />
<Compile Include="Settings\Updates\UpdatesSharing.cs" />
<Compile Include="Program.cs" />
Expand Down
4 changes: 2 additions & 2 deletions src/Privatezilla/Properties/AssemblyInfo.cs
Expand Up @@ -32,5 +32,5 @@
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
// indem Sie "*" wie unten gezeigt eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.41.10")]
[assembly: AssemblyFileVersion("0.41.10")]
[assembly: AssemblyVersion("0.42.0")]
[assembly: AssemblyFileVersion("0.42.0")]
6 changes: 5 additions & 1 deletion src/Privatezilla/Settings/Cortana/DisableCortana.cs
Expand Up @@ -6,6 +6,7 @@ namespace Privatezilla.Setting.Cortana
internal class DisableCortana : SettingBase
{
private const string CortanaKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Windows Search";
private const string CortanaIconKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced";
private const int DesiredValue = 0;

public override string ID()
Expand All @@ -21,7 +22,8 @@ public override string Info()
public override bool CheckSetting()
{
return !(
RegistryHelper.IntEquals(CortanaKey, "AllowCortana", DesiredValue)
RegistryHelper.IntEquals(CortanaKey, "AllowCortana", DesiredValue) &&
RegistryHelper.IntEquals(CortanaIconKey, "ShowCortanaButton", DesiredValue)
);
}

Expand All @@ -30,6 +32,7 @@ public override bool DoSetting()
try
{
Registry.SetValue(CortanaKey, "AllowCortana", DesiredValue, RegistryValueKind.DWord);
Registry.SetValue(CortanaIconKey, "ShowCortanaButton", DesiredValue, RegistryValueKind.DWord);
return true;
}
catch
Expand All @@ -43,6 +46,7 @@ public override bool UndoSetting()
try
{
Registry.SetValue(CortanaKey, "AllowCortana", 1, RegistryValueKind.DWord);
Registry.SetValue(CortanaIconKey, "ShowCortanaButton", 1, RegistryValueKind.DWord);
return true;
}
catch
Expand Down
57 changes: 57 additions & 0 deletions src/Privatezilla/Settings/Updates/DisableSafeguards.cs
@@ -0,0 +1,57 @@
using Microsoft.Win32;
using Privatezilla.Locales;

namespace Privatezilla.Setting.Updates
{
internal class DisableSafeguards : SettingBase
{
private const string SharingKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate";
private const int DesiredValue = 1;

public override string ID()
{
return Locale.settingsUpdatesDisableSafeguards;
}

public override string Info()
{
return Locale.settingsUpdatesDisableSafeguardsInfo.Replace("\\n", "\n");
}

public override bool CheckSetting()
{
return !(
RegistryHelper.IntEquals(SharingKey, "DisableWUfBSafeguards", DesiredValue)
);
}

public override bool DoSetting()
{
try
{
Registry.SetValue(SharingKey, "DisableWUfBSafeguards", DesiredValue, RegistryValueKind.DWord);
return true;
}
catch
{ }

return false;
}

public override bool UndoSetting()
{
try
{
var RegKey = Registry.LocalMachine.OpenSubKey(@"Software\Policies\Microsoft\Windows\WindowsUpdate", true);
RegKey.DeleteValue("DisableWUfBSafeguards");

return true;
}
catch
{ }

return false;
}

}
}

0 comments on commit f30a1d2

Please sign in to comment.