Skip to content

Commit f30a1d2

Browse files
authored
Add files via upload
1 parent 19129c8 commit f30a1d2

File tree

7 files changed

+91
-4
lines changed

7 files changed

+91
-4
lines changed

src/Privatezilla/Locales/Locale.Designer.cs

Lines changed: 19 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Privatezilla/Locales/Locale.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,12 @@ Add translation credits here!</comment>
677677
<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>
678678
<comment>Settings &gt; Updates</comment>
679679
</data>
680+
<data name="settingsUpdatesDisableSafeguards" xml:space="preserve">
681+
<value>Disable safeguards for Feature Updates</value>
682+
</data>
683+
<data name="settingsUpdatesDisableSafeguardsInfo" xml:space="preserve">
684+
<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>
685+
</data>
680686
<data name="settingsUpdatesDisableUpdates" xml:space="preserve">
681687
<value>Disable forced Windows updates</value>
682688
<comment>Settings &gt; Updates</comment>

src/Privatezilla/MainWindow.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ public void InitializeSettings()
201201
new SettingNode(new Setting.Updates.DisableUpdates()),
202202
new SettingNode(new Setting.Updates.DisableUpdatesSharing()),
203203
new SettingNode(new Setting.Updates.BlockMajorUpdates()),
204+
new SettingNode(new Setting.Updates.DisableSafeguards()),
204205
});
205206

206207
// Settings > Gaming

src/Privatezilla/Privatezilla.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@
145145
<Compile Include="Settings\Security\DisablePassword.cs" />
146146
<Compile Include="Settings\Security\WindowsDRM.cs" />
147147
<Compile Include="Settings\Updates\BlockMajorUpdates.cs" />
148+
<Compile Include="Settings\Updates\DisableSafeguards.cs" />
148149
<Compile Include="Settings\Updates\DisableUpdates.cs" />
149150
<Compile Include="Settings\Updates\UpdatesSharing.cs" />
150151
<Compile Include="Program.cs" />

src/Privatezilla/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
3333
// indem Sie "*" wie unten gezeigt eingeben:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("0.41.10")]
36-
[assembly: AssemblyFileVersion("0.41.10")]
35+
[assembly: AssemblyVersion("0.42.0")]
36+
[assembly: AssemblyFileVersion("0.42.0")]

src/Privatezilla/Settings/Cortana/DisableCortana.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ namespace Privatezilla.Setting.Cortana
66
internal class DisableCortana : SettingBase
77
{
88
private const string CortanaKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Windows Search";
9+
private const string CortanaIconKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced";
910
private const int DesiredValue = 0;
1011

1112
public override string ID()
@@ -21,7 +22,8 @@ public override string Info()
2122
public override bool CheckSetting()
2223
{
2324
return !(
24-
RegistryHelper.IntEquals(CortanaKey, "AllowCortana", DesiredValue)
25+
RegistryHelper.IntEquals(CortanaKey, "AllowCortana", DesiredValue) &&
26+
RegistryHelper.IntEquals(CortanaIconKey, "ShowCortanaButton", DesiredValue)
2527
);
2628
}
2729

@@ -30,6 +32,7 @@ public override bool DoSetting()
3032
try
3133
{
3234
Registry.SetValue(CortanaKey, "AllowCortana", DesiredValue, RegistryValueKind.DWord);
35+
Registry.SetValue(CortanaIconKey, "ShowCortanaButton", DesiredValue, RegistryValueKind.DWord);
3336
return true;
3437
}
3538
catch
@@ -43,6 +46,7 @@ public override bool UndoSetting()
4346
try
4447
{
4548
Registry.SetValue(CortanaKey, "AllowCortana", 1, RegistryValueKind.DWord);
49+
Registry.SetValue(CortanaIconKey, "ShowCortanaButton", 1, RegistryValueKind.DWord);
4650
return true;
4751
}
4852
catch
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
using Microsoft.Win32;
2+
using Privatezilla.Locales;
3+
4+
namespace Privatezilla.Setting.Updates
5+
{
6+
internal class DisableSafeguards : SettingBase
7+
{
8+
private const string SharingKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate";
9+
private const int DesiredValue = 1;
10+
11+
public override string ID()
12+
{
13+
return Locale.settingsUpdatesDisableSafeguards;
14+
}
15+
16+
public override string Info()
17+
{
18+
return Locale.settingsUpdatesDisableSafeguardsInfo.Replace("\\n", "\n");
19+
}
20+
21+
public override bool CheckSetting()
22+
{
23+
return !(
24+
RegistryHelper.IntEquals(SharingKey, "DisableWUfBSafeguards", DesiredValue)
25+
);
26+
}
27+
28+
public override bool DoSetting()
29+
{
30+
try
31+
{
32+
Registry.SetValue(SharingKey, "DisableWUfBSafeguards", DesiredValue, RegistryValueKind.DWord);
33+
return true;
34+
}
35+
catch
36+
{ }
37+
38+
return false;
39+
}
40+
41+
public override bool UndoSetting()
42+
{
43+
try
44+
{
45+
var RegKey = Registry.LocalMachine.OpenSubKey(@"Software\Policies\Microsoft\Windows\WindowsUpdate", true);
46+
RegKey.DeleteValue("DisableWUfBSafeguards");
47+
48+
return true;
49+
}
50+
catch
51+
{ }
52+
53+
return false;
54+
}
55+
56+
}
57+
}

0 commit comments

Comments
 (0)