Add files via upload
This commit is contained in:
parent
d42dc1c384
commit
b7b2011b15
81 changed files with 5710 additions and 0 deletions
25
src/Privatezilla.sln
vendored
Normal file
25
src/Privatezilla.sln
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.30011.22
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Privatezilla", "Privatezilla\Privatezilla.csproj", "{1CF5392E-0522-49D4-8343-B732BE762086}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1CF5392E-0522-49D4-8343-B732BE762086}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1CF5392E-0522-49D4-8343-B732BE762086}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1CF5392E-0522-49D4-8343-B732BE762086}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1CF5392E-0522-49D4-8343-B732BE762086}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {8E8CB191-75D5-4C79-A0FE-23D7D018C316}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
6
src/Privatezilla/App.config
vendored
Normal file
6
src/Privatezilla/App.config
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
|
||||
</startup>
|
||||
</configuration>
|
44
src/Privatezilla/Helpers/RegistryHelper.cs
vendored
Normal file
44
src/Privatezilla/Helpers/RegistryHelper.cs
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
using Microsoft.Win32;
|
||||
using Privatezilla.Setting;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Privatezilla
|
||||
{
|
||||
/// <summary>
|
||||
/// Check whether Registry values equal
|
||||
/// </summary>
|
||||
internal class RegistryHelper
|
||||
{
|
||||
public SettingBase Setting { get; }
|
||||
|
||||
public static bool IntEquals(string keyName, string valueName, int expectedValue)
|
||||
{
|
||||
try
|
||||
{
|
||||
var value = Registry.GetValue(keyName, valueName, null);
|
||||
return (value != null && (int)value == expectedValue);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
{
|
||||
MessageBox.Show(keyName, ex.Message, MessageBoxButtons.OK);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool StringEquals(string keyName, string valueName, string expectedValue)
|
||||
{
|
||||
try
|
||||
{
|
||||
var value = Registry.GetValue(keyName, valueName, null);
|
||||
return (value != null && (string)value == expectedValue);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(keyName, ex.Message, MessageBoxButtons.OK);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
19
src/Privatezilla/Helpers/SettingsNode.cs
vendored
Normal file
19
src/Privatezilla/Helpers/SettingsNode.cs
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
using Privatezilla.Setting;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Privatezilla
|
||||
{
|
||||
internal class SettingNode : TreeNode
|
||||
{
|
||||
public SettingBase Setting { get; }
|
||||
|
||||
public SettingNode(SettingBase setting)
|
||||
{
|
||||
Setting = setting;
|
||||
Text = Setting.ID();
|
||||
ToolTipText = Setting.Info();
|
||||
//Checked = true;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
35
src/Privatezilla/Helpers/SetttingsBase.cs
vendored
Normal file
35
src/Privatezilla/Helpers/SetttingsBase.cs
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
namespace Privatezilla.Setting
|
||||
{
|
||||
public abstract class SettingBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of setting
|
||||
/// </summary>
|
||||
/// <returns>The setting name</returns>
|
||||
public abstract string ID();
|
||||
|
||||
/// <summary>
|
||||
/// Tooltip text of setting
|
||||
/// </summary>
|
||||
/// <returns>The setting tooltip</returns>
|
||||
public abstract string Info();
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether the setting should be applied
|
||||
/// </summary>
|
||||
/// <returns>Returns true if the setting should be applied, false otherwise.</returns>
|
||||
public abstract bool CheckSetting();
|
||||
|
||||
/// <summary>
|
||||
/// Applies the setting
|
||||
/// </summary>
|
||||
/// <returns>Returns true if the setting was successfull, false otherwise.</returns>
|
||||
public abstract bool DoSetting();
|
||||
|
||||
/// <summary>
|
||||
/// Revert the setting
|
||||
/// </summary>
|
||||
/// <returns>Returns true if the setting was successfull, false otherwise.</returns>
|
||||
public abstract bool UndoSetting();
|
||||
}
|
||||
}
|
16
src/Privatezilla/Helpers/WindowsHelper.cs
vendored
Normal file
16
src/Privatezilla/Helpers/WindowsHelper.cs
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla
|
||||
{
|
||||
internal static class WindowsHelper
|
||||
{
|
||||
internal static string GetOS()
|
||||
{
|
||||
|
||||
string releaseID = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ReleaseId", "").ToString();
|
||||
return releaseID;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
40
src/Privatezilla/Interfaces/IListView.cs
vendored
Normal file
40
src/Privatezilla/Interfaces/IListView.cs
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Privatezilla
|
||||
{
|
||||
/* Modified ListView sort example from https://support.microsoft.com/en-us/kb/319401
|
||||
which will not only sort ascending but both ways */
|
||||
|
||||
public class ListViewItemComparer : IComparer
|
||||
{
|
||||
private readonly int col;
|
||||
private readonly bool bAsc = false;
|
||||
|
||||
public ListViewItemComparer()
|
||||
{
|
||||
col = 0;
|
||||
}
|
||||
|
||||
public ListViewItemComparer(int column, bool b)
|
||||
{
|
||||
col = column;
|
||||
bAsc = b;
|
||||
}
|
||||
|
||||
public int Compare(object x, object y)
|
||||
{
|
||||
if (bAsc)
|
||||
{
|
||||
return String.Compare(((ListViewItem)x).SubItems[col].Text, ((ListViewItem)y).SubItems[col].Text);
|
||||
// bAsc = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return String.Compare(((ListViewItem)y).SubItems[col].Text, ((ListViewItem)x).SubItems[col].Text);
|
||||
// bAsc = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
25
src/Privatezilla/Interfaces/ITreeNode.cs
vendored
Normal file
25
src/Privatezilla/Interfaces/ITreeNode.cs
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Privatezilla.ITreeNode
|
||||
{
|
||||
public static class ITreeNode
|
||||
{
|
||||
// Retrieving TreeView nodes as IEnumerable
|
||||
public static IEnumerable<TreeNode> All(this TreeNodeCollection nodes)
|
||||
{
|
||||
if (nodes == null) throw new ArgumentNullException(nameof(nodes));
|
||||
|
||||
foreach (TreeNode n in nodes)
|
||||
{
|
||||
yield return n;
|
||||
|
||||
foreach (TreeNode child in n.Nodes.All())
|
||||
{
|
||||
yield return child;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
612
src/Privatezilla/MainWindow.Designer.cs
generated
vendored
Normal file
612
src/Privatezilla/MainWindow.Designer.cs
generated
vendored
Normal file
|
@ -0,0 +1,612 @@
|
|||
namespace Privatezilla
|
||||
{
|
||||
partial class MainWindow
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verwendete Ressourcen bereinigen.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Vom Windows Form-Designer generierter Code
|
||||
|
||||
/// <summary>
|
||||
/// Erforderliche Methode für die Designerunterstützung.
|
||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow));
|
||||
this.TvwSettings = new System.Windows.Forms.TreeView();
|
||||
this.LblMainMenu = new System.Windows.Forms.Button();
|
||||
this.MainMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.Help = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.CommunityPkg = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.CheckRelease = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.Info = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.PnlNav = new System.Windows.Forms.Panel();
|
||||
this.LblPS = new System.Windows.Forms.LinkLabel();
|
||||
this.LblSettings = new System.Windows.Forms.LinkLabel();
|
||||
this.LstPS = new System.Windows.Forms.CheckedListBox();
|
||||
this.PnlSettings = new System.Windows.Forms.Panel();
|
||||
this.PicOpenGitHubPage = new System.Windows.Forms.PictureBox();
|
||||
this.BtnSettingsUndo = new System.Windows.Forms.Button();
|
||||
this.LvwStatus = new System.Windows.Forms.ListView();
|
||||
this.Setting = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.State = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.PBar = new System.Windows.Forms.ProgressBar();
|
||||
this.BtnSettingsDo = new System.Windows.Forms.Button();
|
||||
this.BtnSettingsAnalyze = new System.Windows.Forms.Button();
|
||||
this.LblStatus = new System.Windows.Forms.Label();
|
||||
this.PnlPS = new System.Windows.Forms.Panel();
|
||||
this.BtnMenuPS = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.ChkCodePS = new System.Windows.Forms.CheckBox();
|
||||
this.BtnDoPS = new System.Windows.Forms.Button();
|
||||
this.TxtPSInfo = new System.Windows.Forms.TextBox();
|
||||
this.TxtConsolePS = new System.Windows.Forms.TextBox();
|
||||
this.TxtOutputPS = new System.Windows.Forms.TextBox();
|
||||
this.PSMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.PSImport = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.PSSaveAs = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.PSMarketplace = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.ToolTip = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.MainMenu.SuspendLayout();
|
||||
this.PnlNav.SuspendLayout();
|
||||
this.PnlSettings.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PicOpenGitHubPage)).BeginInit();
|
||||
this.PnlPS.SuspendLayout();
|
||||
this.PSMenu.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// TvwSettings
|
||||
//
|
||||
this.TvwSettings.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.TvwSettings.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.TvwSettings.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.TvwSettings.CheckBoxes = true;
|
||||
this.TvwSettings.Font = new System.Drawing.Font("Segoe UI Semilight", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.TvwSettings.LineColor = System.Drawing.Color.DarkOrchid;
|
||||
this.TvwSettings.Location = new System.Drawing.Point(12, 88);
|
||||
this.TvwSettings.Name = "TvwSettings";
|
||||
this.TvwSettings.ShowLines = false;
|
||||
this.TvwSettings.ShowNodeToolTips = true;
|
||||
this.TvwSettings.ShowPlusMinus = false;
|
||||
this.TvwSettings.Size = new System.Drawing.Size(355, 749);
|
||||
this.TvwSettings.TabIndex = 18;
|
||||
this.TvwSettings.TabStop = false;
|
||||
this.TvwSettings.AfterCheck += new System.Windows.Forms.TreeViewEventHandler(this.TvwSetting_AfterCheck);
|
||||
//
|
||||
// LblMainMenu
|
||||
//
|
||||
this.LblMainMenu.AutoSize = true;
|
||||
this.LblMainMenu.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.LblMainMenu.FlatAppearance.BorderColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.LblMainMenu.FlatAppearance.BorderSize = 0;
|
||||
this.LblMainMenu.FlatAppearance.MouseOverBackColor = System.Drawing.Color.HotPink;
|
||||
this.LblMainMenu.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.LblMainMenu.Font = new System.Drawing.Font("Segoe MDL2 Assets", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.LblMainMenu.ForeColor = System.Drawing.Color.Black;
|
||||
this.LblMainMenu.Location = new System.Drawing.Point(0, 0);
|
||||
this.LblMainMenu.Name = "LblMainMenu";
|
||||
this.LblMainMenu.Size = new System.Drawing.Size(48, 51);
|
||||
this.LblMainMenu.TabIndex = 21;
|
||||
this.LblMainMenu.UseVisualStyleBackColor = false;
|
||||
this.LblMainMenu.Click += new System.EventHandler(this.LblMainMenu_Click);
|
||||
//
|
||||
// MainMenu
|
||||
//
|
||||
this.MainMenu.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.MainMenu.ImageScalingSize = new System.Drawing.Size(18, 18);
|
||||
this.MainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.Help,
|
||||
this.CommunityPkg,
|
||||
this.CheckRelease,
|
||||
this.Info});
|
||||
this.MainMenu.Name = "MainMenu";
|
||||
this.MainMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
|
||||
this.MainMenu.Size = new System.Drawing.Size(271, 116);
|
||||
//
|
||||
// Help
|
||||
//
|
||||
this.Help.Font = new System.Drawing.Font("Segoe UI", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Help.Name = "Help";
|
||||
this.Help.Size = new System.Drawing.Size(270, 28);
|
||||
this.Help.Text = "Short Guide";
|
||||
this.Help.Click += new System.EventHandler(this.Help_Click);
|
||||
//
|
||||
// CommunityPkg
|
||||
//
|
||||
this.CommunityPkg.Font = new System.Drawing.Font("Segoe UI", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.CommunityPkg.Image = ((System.Drawing.Image)(resources.GetObject("CommunityPkg.Image")));
|
||||
this.CommunityPkg.Name = "CommunityPkg";
|
||||
this.CommunityPkg.Size = new System.Drawing.Size(270, 28);
|
||||
this.CommunityPkg.Text = "Get community package";
|
||||
this.CommunityPkg.Click += new System.EventHandler(this.CommunityPkg_Click);
|
||||
//
|
||||
// CheckRelease
|
||||
//
|
||||
this.CheckRelease.Font = new System.Drawing.Font("Segoe UI", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.CheckRelease.Name = "CheckRelease";
|
||||
this.CheckRelease.Size = new System.Drawing.Size(270, 28);
|
||||
this.CheckRelease.Text = "Check for updates";
|
||||
this.CheckRelease.Click += new System.EventHandler(this.CheckRelease_Click);
|
||||
//
|
||||
// Info
|
||||
//
|
||||
this.Info.Font = new System.Drawing.Font("Segoe UI", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Info.Name = "Info";
|
||||
this.Info.Size = new System.Drawing.Size(270, 28);
|
||||
this.Info.Text = "Info";
|
||||
this.Info.Click += new System.EventHandler(this.Info_Click);
|
||||
//
|
||||
// PnlNav
|
||||
//
|
||||
this.PnlNav.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.PnlNav.Controls.Add(this.LblPS);
|
||||
this.PnlNav.Controls.Add(this.LblSettings);
|
||||
this.PnlNav.Controls.Add(this.LblMainMenu);
|
||||
this.PnlNav.Controls.Add(this.TvwSettings);
|
||||
this.PnlNav.Controls.Add(this.LstPS);
|
||||
this.PnlNav.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.PnlNav.Location = new System.Drawing.Point(0, 0);
|
||||
this.PnlNav.Name = "PnlNav";
|
||||
this.PnlNav.Size = new System.Drawing.Size(367, 837);
|
||||
this.PnlNav.TabIndex = 26;
|
||||
//
|
||||
// LblPS
|
||||
//
|
||||
this.LblPS.ActiveLinkColor = System.Drawing.Color.DeepPink;
|
||||
this.LblPS.AutoEllipsis = true;
|
||||
this.LblPS.AutoSize = true;
|
||||
this.LblPS.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.LblPS.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.LblPS.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
|
||||
this.LblPS.LinkColor = System.Drawing.Color.Black;
|
||||
this.LblPS.Location = new System.Drawing.Point(104, 54);
|
||||
this.LblPS.Name = "LblPS";
|
||||
this.LblPS.Size = new System.Drawing.Size(60, 21);
|
||||
this.LblPS.TabIndex = 25;
|
||||
this.LblPS.TabStop = true;
|
||||
this.LblPS.Text = "Scripts";
|
||||
this.LblPS.Visible = false;
|
||||
this.LblPS.VisitedLinkColor = System.Drawing.Color.DimGray;
|
||||
this.LblPS.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LblPS_LinkClicked);
|
||||
//
|
||||
// LblSettings
|
||||
//
|
||||
this.LblSettings.ActiveLinkColor = System.Drawing.Color.DeepPink;
|
||||
this.LblSettings.AutoEllipsis = true;
|
||||
this.LblSettings.AutoSize = true;
|
||||
this.LblSettings.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.LblSettings.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
this.LblSettings.LinkBehavior = System.Windows.Forms.LinkBehavior.HoverUnderline;
|
||||
this.LblSettings.LinkColor = System.Drawing.Color.Black;
|
||||
this.LblSettings.Location = new System.Drawing.Point(12, 54);
|
||||
this.LblSettings.Name = "LblSettings";
|
||||
this.LblSettings.Size = new System.Drawing.Size(70, 21);
|
||||
this.LblSettings.TabIndex = 24;
|
||||
this.LblSettings.TabStop = true;
|
||||
this.LblSettings.Text = "Settings";
|
||||
this.LblSettings.VisitedLinkColor = System.Drawing.Color.DimGray;
|
||||
this.LblSettings.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LblSettings_LinkClicked);
|
||||
//
|
||||
// LstPS
|
||||
//
|
||||
this.LstPS.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.LstPS.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.LstPS.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.LstPS.Font = new System.Drawing.Font("Segoe UI Semilight", 12.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.LstPS.ForeColor = System.Drawing.Color.Black;
|
||||
this.LstPS.FormattingEnabled = true;
|
||||
this.LstPS.Location = new System.Drawing.Point(16, 88);
|
||||
this.LstPS.Name = "LstPS";
|
||||
this.LstPS.Size = new System.Drawing.Size(351, 700);
|
||||
this.LstPS.Sorted = true;
|
||||
this.LstPS.TabIndex = 112;
|
||||
this.LstPS.ThreeDCheckBoxes = true;
|
||||
this.LstPS.Visible = false;
|
||||
this.LstPS.SelectedIndexChanged += new System.EventHandler(this.LstPS_SelectedIndexChanged);
|
||||
//
|
||||
// PnlSettings
|
||||
//
|
||||
this.PnlSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.PnlSettings.Controls.Add(this.PicOpenGitHubPage);
|
||||
this.PnlSettings.Controls.Add(this.BtnSettingsUndo);
|
||||
this.PnlSettings.Controls.Add(this.LvwStatus);
|
||||
this.PnlSettings.Controls.Add(this.PBar);
|
||||
this.PnlSettings.Controls.Add(this.BtnSettingsDo);
|
||||
this.PnlSettings.Controls.Add(this.BtnSettingsAnalyze);
|
||||
this.PnlSettings.Controls.Add(this.LblStatus);
|
||||
this.PnlSettings.Location = new System.Drawing.Point(366, 0);
|
||||
this.PnlSettings.Name = "PnlSettings";
|
||||
this.PnlSettings.Size = new System.Drawing.Size(716, 837);
|
||||
this.PnlSettings.TabIndex = 113;
|
||||
//
|
||||
// PicOpenGitHubPage
|
||||
//
|
||||
this.PicOpenGitHubPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.PicOpenGitHubPage.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.PicOpenGitHubPage.Image = ((System.Drawing.Image)(resources.GetObject("PicOpenGitHubPage.Image")));
|
||||
this.PicOpenGitHubPage.Location = new System.Drawing.Point(681, 7);
|
||||
this.PicOpenGitHubPage.Name = "PicOpenGitHubPage";
|
||||
this.PicOpenGitHubPage.Size = new System.Drawing.Size(24, 24);
|
||||
this.PicOpenGitHubPage.TabIndex = 32;
|
||||
this.PicOpenGitHubPage.TabStop = false;
|
||||
this.ToolTip.SetToolTip(this.PicOpenGitHubPage, "github/privatezilla");
|
||||
this.PicOpenGitHubPage.Click += new System.EventHandler(this.PicOpenGitHubPage_Click);
|
||||
//
|
||||
// BtnSettingsUndo
|
||||
//
|
||||
this.BtnSettingsUndo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnSettingsUndo.BackColor = System.Drawing.Color.Gainsboro;
|
||||
this.BtnSettingsUndo.FlatAppearance.BorderColor = System.Drawing.Color.Gainsboro;
|
||||
this.BtnSettingsUndo.FlatAppearance.BorderSize = 0;
|
||||
this.BtnSettingsUndo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnSettingsUndo.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.BtnSettingsUndo.Location = new System.Drawing.Point(298, 794);
|
||||
this.BtnSettingsUndo.Name = "BtnSettingsUndo";
|
||||
this.BtnSettingsUndo.Size = new System.Drawing.Size(196, 32);
|
||||
this.BtnSettingsUndo.TabIndex = 30;
|
||||
this.BtnSettingsUndo.Text = "Revert selected";
|
||||
this.BtnSettingsUndo.UseVisualStyleBackColor = false;
|
||||
this.BtnSettingsUndo.Click += new System.EventHandler(this.BtnSettingsUndo_Click);
|
||||
//
|
||||
// LvwStatus
|
||||
//
|
||||
this.LvwStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.LvwStatus.BackColor = System.Drawing.Color.White;
|
||||
this.LvwStatus.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.LvwStatus.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.Setting,
|
||||
this.State});
|
||||
this.LvwStatus.Font = new System.Drawing.Font("Segoe UI Semilight", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.LvwStatus.FullRowSelect = true;
|
||||
this.LvwStatus.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
|
||||
this.LvwStatus.HideSelection = false;
|
||||
this.LvwStatus.Location = new System.Drawing.Point(9, 50);
|
||||
this.LvwStatus.Name = "LvwStatus";
|
||||
this.LvwStatus.Size = new System.Drawing.Size(704, 723);
|
||||
this.LvwStatus.TabIndex = 31;
|
||||
this.LvwStatus.TileSize = new System.Drawing.Size(1, 1);
|
||||
this.LvwStatus.UseCompatibleStateImageBehavior = false;
|
||||
this.LvwStatus.View = System.Windows.Forms.View.Details;
|
||||
this.LvwStatus.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.LvwStatus_ColumnClick);
|
||||
//
|
||||
// Setting
|
||||
//
|
||||
this.Setting.Text = "Setting";
|
||||
this.Setting.Width = 550;
|
||||
//
|
||||
// State
|
||||
//
|
||||
this.State.Text = "State";
|
||||
this.State.Width = 150;
|
||||
//
|
||||
// PBar
|
||||
//
|
||||
this.PBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.PBar.Location = new System.Drawing.Point(12, 41);
|
||||
this.PBar.Name = "PBar";
|
||||
this.PBar.Size = new System.Drawing.Size(814, 5);
|
||||
this.PBar.TabIndex = 27;
|
||||
this.PBar.Visible = false;
|
||||
//
|
||||
// BtnSettingsDo
|
||||
//
|
||||
this.BtnSettingsDo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnSettingsDo.BackColor = System.Drawing.Color.Gainsboro;
|
||||
this.BtnSettingsDo.FlatAppearance.BorderColor = System.Drawing.Color.Gainsboro;
|
||||
this.BtnSettingsDo.FlatAppearance.BorderSize = 0;
|
||||
this.BtnSettingsDo.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnSettingsDo.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.BtnSettingsDo.Location = new System.Drawing.Point(509, 794);
|
||||
this.BtnSettingsDo.Name = "BtnSettingsDo";
|
||||
this.BtnSettingsDo.Size = new System.Drawing.Size(196, 32);
|
||||
this.BtnSettingsDo.TabIndex = 26;
|
||||
this.BtnSettingsDo.Text = "Apply selected";
|
||||
this.BtnSettingsDo.UseVisualStyleBackColor = false;
|
||||
this.BtnSettingsDo.Click += new System.EventHandler(this.BtnSettingsDo_Click);
|
||||
//
|
||||
// BtnSettingsAnalyze
|
||||
//
|
||||
this.BtnSettingsAnalyze.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.BtnSettingsAnalyze.BackColor = System.Drawing.Color.Gainsboro;
|
||||
this.BtnSettingsAnalyze.FlatAppearance.BorderColor = System.Drawing.Color.Gainsboro;
|
||||
this.BtnSettingsAnalyze.FlatAppearance.BorderSize = 0;
|
||||
this.BtnSettingsAnalyze.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnSettingsAnalyze.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.BtnSettingsAnalyze.Location = new System.Drawing.Point(13, 794);
|
||||
this.BtnSettingsAnalyze.Name = "BtnSettingsAnalyze";
|
||||
this.BtnSettingsAnalyze.Size = new System.Drawing.Size(196, 32);
|
||||
this.BtnSettingsAnalyze.TabIndex = 28;
|
||||
this.BtnSettingsAnalyze.Text = "Analyze";
|
||||
this.BtnSettingsAnalyze.UseVisualStyleBackColor = false;
|
||||
this.BtnSettingsAnalyze.Click += new System.EventHandler(this.BtnSettingsAnalyze_Click);
|
||||
//
|
||||
// LblStatus
|
||||
//
|
||||
this.LblStatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.LblStatus.AutoEllipsis = true;
|
||||
this.LblStatus.BackColor = System.Drawing.Color.White;
|
||||
this.LblStatus.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.LblStatus.Location = new System.Drawing.Point(9, 7);
|
||||
this.LblStatus.Name = "LblStatus";
|
||||
this.LblStatus.Size = new System.Drawing.Size(704, 40);
|
||||
this.LblStatus.TabIndex = 29;
|
||||
this.LblStatus.Text = "Press Analyze to check for configured settings.";
|
||||
//
|
||||
// PnlPS
|
||||
//
|
||||
this.PnlPS.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.PnlPS.BackColor = System.Drawing.Color.White;
|
||||
this.PnlPS.Controls.Add(this.BtnMenuPS);
|
||||
this.PnlPS.Controls.Add(this.label1);
|
||||
this.PnlPS.Controls.Add(this.ChkCodePS);
|
||||
this.PnlPS.Controls.Add(this.BtnDoPS);
|
||||
this.PnlPS.Controls.Add(this.TxtPSInfo);
|
||||
this.PnlPS.Controls.Add(this.TxtConsolePS);
|
||||
this.PnlPS.Controls.Add(this.TxtOutputPS);
|
||||
this.PnlPS.Location = new System.Drawing.Point(366, 0);
|
||||
this.PnlPS.Name = "PnlPS";
|
||||
this.PnlPS.Size = new System.Drawing.Size(716, 837);
|
||||
this.PnlPS.TabIndex = 113;
|
||||
this.PnlPS.Visible = false;
|
||||
//
|
||||
// BtnMenuPS
|
||||
//
|
||||
this.BtnMenuPS.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnMenuPS.BackColor = System.Drawing.Color.Gainsboro;
|
||||
this.BtnMenuPS.FlatAppearance.BorderColor = System.Drawing.Color.Gainsboro;
|
||||
this.BtnMenuPS.FlatAppearance.BorderSize = 0;
|
||||
this.BtnMenuPS.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Silver;
|
||||
this.BtnMenuPS.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnMenuPS.Font = new System.Drawing.Font("Segoe UI", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.BtnMenuPS.ForeColor = System.Drawing.Color.Black;
|
||||
this.BtnMenuPS.Location = new System.Drawing.Point(671, 0);
|
||||
this.BtnMenuPS.Name = "BtnMenuPS";
|
||||
this.BtnMenuPS.Size = new System.Drawing.Size(45, 45);
|
||||
this.BtnMenuPS.TabIndex = 118;
|
||||
this.BtnMenuPS.Text = ". . .";
|
||||
this.BtnMenuPS.UseVisualStyleBackColor = false;
|
||||
this.BtnMenuPS.Click += new System.EventHandler(this.BtnMenuPS_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label1.BackColor = System.Drawing.Color.Gainsboro;
|
||||
this.label1.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label1.Location = new System.Drawing.Point(0, 0);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0);
|
||||
this.label1.Size = new System.Drawing.Size(716, 45);
|
||||
this.label1.TabIndex = 116;
|
||||
this.label1.Text = "Apply PowerShell Script";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||
//
|
||||
// ChkCodePS
|
||||
//
|
||||
this.ChkCodePS.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.ChkCodePS.Appearance = System.Windows.Forms.Appearance.Button;
|
||||
this.ChkCodePS.BackColor = System.Drawing.Color.Gainsboro;
|
||||
this.ChkCodePS.FlatAppearance.BorderColor = System.Drawing.Color.Black;
|
||||
this.ChkCodePS.FlatAppearance.BorderSize = 0;
|
||||
this.ChkCodePS.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.ChkCodePS.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.ChkCodePS.ForeColor = System.Drawing.Color.Black;
|
||||
this.ChkCodePS.Location = new System.Drawing.Point(13, 794);
|
||||
this.ChkCodePS.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.ChkCodePS.Name = "ChkCodePS";
|
||||
this.ChkCodePS.Size = new System.Drawing.Size(196, 32);
|
||||
this.ChkCodePS.TabIndex = 113;
|
||||
this.ChkCodePS.Text = "View code";
|
||||
this.ChkCodePS.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.ChkCodePS.UseVisualStyleBackColor = false;
|
||||
this.ChkCodePS.CheckedChanged += new System.EventHandler(this.ChkCodePS_CheckedChanged);
|
||||
//
|
||||
// BtnDoPS
|
||||
//
|
||||
this.BtnDoPS.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BtnDoPS.BackColor = System.Drawing.Color.Gainsboro;
|
||||
this.BtnDoPS.FlatAppearance.BorderColor = System.Drawing.Color.Gainsboro;
|
||||
this.BtnDoPS.FlatAppearance.BorderSize = 0;
|
||||
this.BtnDoPS.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnDoPS.Font = new System.Drawing.Font("Segoe UI", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.BtnDoPS.Location = new System.Drawing.Point(509, 794);
|
||||
this.BtnDoPS.Name = "BtnDoPS";
|
||||
this.BtnDoPS.Size = new System.Drawing.Size(196, 32);
|
||||
this.BtnDoPS.TabIndex = 112;
|
||||
this.BtnDoPS.Text = "Apply selected";
|
||||
this.BtnDoPS.UseVisualStyleBackColor = false;
|
||||
this.BtnDoPS.Click += new System.EventHandler(this.BtnDoPS_Click);
|
||||
//
|
||||
// TxtPSInfo
|
||||
//
|
||||
this.TxtPSInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.TxtPSInfo.BackColor = System.Drawing.Color.White;
|
||||
this.TxtPSInfo.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.TxtPSInfo.Font = new System.Drawing.Font("Segoe UI Semilight", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.TxtPSInfo.ForeColor = System.Drawing.Color.Black;
|
||||
this.TxtPSInfo.Location = new System.Drawing.Point(3, 48);
|
||||
this.TxtPSInfo.Multiline = true;
|
||||
this.TxtPSInfo.Name = "TxtPSInfo";
|
||||
this.TxtPSInfo.ReadOnly = true;
|
||||
this.TxtPSInfo.Size = new System.Drawing.Size(238, 778);
|
||||
this.TxtPSInfo.TabIndex = 110;
|
||||
this.TxtPSInfo.Text = resources.GetString("TxtPSInfo.Text");
|
||||
//
|
||||
// TxtConsolePS
|
||||
//
|
||||
this.TxtConsolePS.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TxtConsolePS.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
|
||||
this.TxtConsolePS.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystem;
|
||||
this.TxtConsolePS.BackColor = System.Drawing.Color.PaleTurquoise;
|
||||
this.TxtConsolePS.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.TxtConsolePS.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.TxtConsolePS.ForeColor = System.Drawing.Color.Black;
|
||||
this.TxtConsolePS.Location = new System.Drawing.Point(242, 48);
|
||||
this.TxtConsolePS.Multiline = true;
|
||||
this.TxtConsolePS.Name = "TxtConsolePS";
|
||||
this.TxtConsolePS.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.TxtConsolePS.Size = new System.Drawing.Size(474, 740);
|
||||
this.TxtConsolePS.TabIndex = 111;
|
||||
this.TxtConsolePS.Visible = false;
|
||||
this.TxtConsolePS.WordWrap = false;
|
||||
//
|
||||
// TxtOutputPS
|
||||
//
|
||||
this.TxtOutputPS.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TxtOutputPS.BackColor = System.Drawing.Color.White;
|
||||
this.TxtOutputPS.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.TxtOutputPS.Font = new System.Drawing.Font("Consolas", 9F);
|
||||
this.TxtOutputPS.ForeColor = System.Drawing.Color.Black;
|
||||
this.TxtOutputPS.Location = new System.Drawing.Point(242, 48);
|
||||
this.TxtOutputPS.Multiline = true;
|
||||
this.TxtOutputPS.Name = "TxtOutputPS";
|
||||
this.TxtOutputPS.ScrollBars = System.Windows.Forms.ScrollBars.Both;
|
||||
this.TxtOutputPS.Size = new System.Drawing.Size(474, 740);
|
||||
this.TxtOutputPS.TabIndex = 10;
|
||||
this.TxtOutputPS.Text = "PS";
|
||||
this.TxtOutputPS.WordWrap = false;
|
||||
//
|
||||
// PSMenu
|
||||
//
|
||||
this.PSMenu.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.PSMenu.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Bold);
|
||||
this.PSMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.PSImport,
|
||||
this.PSSaveAs,
|
||||
this.PSMarketplace});
|
||||
this.PSMenu.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Table;
|
||||
this.PSMenu.Name = "contextHostsMenu";
|
||||
this.PSMenu.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
|
||||
this.PSMenu.Size = new System.Drawing.Size(353, 82);
|
||||
//
|
||||
// PSImport
|
||||
//
|
||||
this.PSImport.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.PSImport.Name = "PSImport";
|
||||
this.PSImport.Size = new System.Drawing.Size(352, 26);
|
||||
this.PSImport.Text = "Import script";
|
||||
this.PSImport.Click += new System.EventHandler(this.PSImport_Click);
|
||||
//
|
||||
// PSSaveAs
|
||||
//
|
||||
this.PSSaveAs.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.PSSaveAs.Name = "PSSaveAs";
|
||||
this.PSSaveAs.Size = new System.Drawing.Size(352, 26);
|
||||
this.PSSaveAs.Text = "Save current script as new preset script";
|
||||
this.PSSaveAs.Click += new System.EventHandler(this.PSSaveAs_Click);
|
||||
//
|
||||
// PSMarketplace
|
||||
//
|
||||
this.PSMarketplace.BackColor = System.Drawing.Color.Transparent;
|
||||
this.PSMarketplace.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.PSMarketplace.ForeColor = System.Drawing.Color.Black;
|
||||
this.PSMarketplace.Image = ((System.Drawing.Image)(resources.GetObject("PSMarketplace.Image")));
|
||||
this.PSMarketplace.Name = "PSMarketplace";
|
||||
this.PSMarketplace.Size = new System.Drawing.Size(352, 26);
|
||||
this.PSMarketplace.Text = "Visit Marketplace";
|
||||
this.PSMarketplace.Click += new System.EventHandler(this.PSMarketplace_Click);
|
||||
//
|
||||
// ToolTip
|
||||
//
|
||||
this.ToolTip.AutomaticDelay = 0;
|
||||
this.ToolTip.UseAnimation = false;
|
||||
this.ToolTip.UseFading = false;
|
||||
//
|
||||
// MainWindow
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.ClientSize = new System.Drawing.Size(1083, 837);
|
||||
this.Controls.Add(this.PnlNav);
|
||||
this.Controls.Add(this.PnlSettings);
|
||||
this.Controls.Add(this.PnlPS);
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.MinimumSize = new System.Drawing.Size(1019, 550);
|
||||
this.Name = "MainWindow";
|
||||
this.ShowIcon = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Privatezilla";
|
||||
this.MainMenu.ResumeLayout(false);
|
||||
this.PnlNav.ResumeLayout(false);
|
||||
this.PnlNav.PerformLayout();
|
||||
this.PnlSettings.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.PicOpenGitHubPage)).EndInit();
|
||||
this.PnlPS.ResumeLayout(false);
|
||||
this.PnlPS.PerformLayout();
|
||||
this.PSMenu.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.TreeView TvwSettings;
|
||||
private System.Windows.Forms.Button LblMainMenu;
|
||||
private System.Windows.Forms.ContextMenuStrip MainMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem Info;
|
||||
private System.Windows.Forms.ToolStripMenuItem CheckRelease;
|
||||
private System.Windows.Forms.ToolStripMenuItem Help;
|
||||
private System.Windows.Forms.Panel PnlNav;
|
||||
private System.Windows.Forms.LinkLabel LblSettings;
|
||||
private System.Windows.Forms.LinkLabel LblPS;
|
||||
private System.Windows.Forms.CheckedListBox LstPS;
|
||||
private System.Windows.Forms.Panel PnlSettings;
|
||||
private System.Windows.Forms.ListView LvwStatus;
|
||||
private System.Windows.Forms.ColumnHeader Setting;
|
||||
private System.Windows.Forms.ColumnHeader State;
|
||||
private System.Windows.Forms.Button BtnSettingsUndo;
|
||||
private System.Windows.Forms.ProgressBar PBar;
|
||||
private System.Windows.Forms.Label LblStatus;
|
||||
private System.Windows.Forms.Button BtnSettingsDo;
|
||||
private System.Windows.Forms.Button BtnSettingsAnalyze;
|
||||
private System.Windows.Forms.Panel PnlPS;
|
||||
private System.Windows.Forms.TextBox TxtPSInfo;
|
||||
private System.Windows.Forms.TextBox TxtOutputPS;
|
||||
private System.Windows.Forms.TextBox TxtConsolePS;
|
||||
private System.Windows.Forms.CheckBox ChkCodePS;
|
||||
private System.Windows.Forms.Button BtnDoPS;
|
||||
private System.Windows.Forms.ContextMenuStrip PSMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem PSImport;
|
||||
private System.Windows.Forms.ToolStripMenuItem PSSaveAs;
|
||||
private System.Windows.Forms.ToolStripMenuItem PSMarketplace;
|
||||
private System.Windows.Forms.ToolStripMenuItem CommunityPkg;
|
||||
private System.Windows.Forms.ToolTip ToolTip;
|
||||
private System.Windows.Forms.Button BtnMenuPS;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.PictureBox PicOpenGitHubPage;
|
||||
}
|
||||
}
|
||||
|
751
src/Privatezilla/MainWindow.cs
vendored
Normal file
751
src/Privatezilla/MainWindow.cs
vendored
Normal file
|
@ -0,0 +1,751 @@
|
|||
using Privatezilla.ITreeNode;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Management.Automation;
|
||||
using System.Net;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Privatezilla
|
||||
{
|
||||
public partial class MainWindow : Form
|
||||
{
|
||||
private readonly string _successApply = "Applied";
|
||||
private readonly string _failedApply = "Not applied";
|
||||
private readonly string _successConfigure = "Configured";
|
||||
private readonly string _failedConfigure = "Not configured";
|
||||
private readonly string _finishApply = "Applying complete.";
|
||||
private readonly string _finishUndo = "Reverting complete.";
|
||||
private readonly string _finishAnalyze = "Analysis complete.";
|
||||
private readonly string _doWait = "Please wait ...";
|
||||
private readonly string _undoSettings = "Do you really want to revert all selected settings to Windows 10 default state?";
|
||||
|
||||
private readonly string _helpApp = "Info about a setting:\nMove the cursor over a setting to view a brief explanation." +
|
||||
"\r\n\nAnalyze (Button):\nDetermines which settings are enabled and configured on your system or not. NO system changes are done yet!" +
|
||||
"\r\n\nApply selected (Button):\nThis will enable all selected settings." +
|
||||
"\r\n\nRevert selected (Button):\nThis will restore the default Windows 10 settings." +
|
||||
"\r\n\nConfigured (State):\nThis indicates your privacy is protected." +
|
||||
"\r\n\nNot Configured (State):\nThis indicates that the Windows 10 settings are in place.";
|
||||
|
||||
// Script strings (optional)
|
||||
private readonly string _psSelect = "Please select a script.";
|
||||
|
||||
private readonly string _psInfo = "What does this template/script do?\r\n\n";
|
||||
private readonly string _psSuccess = "has been successfully executed.";
|
||||
private readonly string _psSave = "Please switch to code view.";
|
||||
|
||||
// Setting progress
|
||||
private int _progress = 0;
|
||||
|
||||
private int _progressIncrement = 0;
|
||||
|
||||
// Update
|
||||
private readonly string _releaseURL = "https://raw.githubusercontent.com/builtbybel/privatezilla/master/latest.txt";
|
||||
|
||||
private readonly string _releaseUpToDate = "There are currently no updates available.";
|
||||
private readonly string _releaseUnofficial = "You are using an unoffical version of Privatezilla.";
|
||||
|
||||
public Version CurrentVersion = new Version(Application.ProductVersion);
|
||||
public Version LatestVersion;
|
||||
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Initilize settings
|
||||
InitializeGPO();
|
||||
|
||||
// Check if community package is installed
|
||||
CommunityPackageAvailable();
|
||||
|
||||
// GUI options
|
||||
LblMainMenu.Text = "\ue700"; // Hamburger menu
|
||||
}
|
||||
|
||||
public void InitializeGPO()
|
||||
{
|
||||
TvwSettings.Nodes.Clear();
|
||||
|
||||
// Root node
|
||||
TreeNode root = new TreeNode("Windows 10 (" + WindowsHelper.GetOS() + ")")
|
||||
{
|
||||
Checked = false
|
||||
};
|
||||
|
||||
// Settings > Privacy
|
||||
TreeNode privacy = new TreeNode("Privacy", new TreeNode[] {
|
||||
new SettingNode(new Setting.Privacy.DisableTelemetry()),
|
||||
new SettingNode(new Setting.Privacy.DisableCompTelemetry()),
|
||||
new SettingNode(new Setting.Privacy.DisableAds()),
|
||||
new SettingNode(new Setting.Privacy.DisableWiFi()),
|
||||
new SettingNode(new Setting.Privacy.DiagnosticData()),
|
||||
new SettingNode(new Setting.Privacy.HandwritingData()),
|
||||
new SettingNode(new Setting.Privacy.DisableBiometrics()),
|
||||
new SettingNode(new Setting.Privacy.DisableTimeline()),
|
||||
new SettingNode(new Setting.Privacy.DisableLocation()),
|
||||
new SettingNode(new Setting.Privacy.DisableFeedback()),
|
||||
new SettingNode(new Setting.Privacy.DisableTips()),
|
||||
new SettingNode(new Setting.Privacy.DisableTipsLockScreen()),
|
||||
new SettingNode(new Setting.Privacy.InstalledApps()),
|
||||
new SettingNode(new Setting.Privacy.SuggestedApps()),
|
||||
new SettingNode(new Setting.Privacy.SuggestedContent()),
|
||||
new SettingNode(new Setting.Privacy.DisableCEIP()),
|
||||
new SettingNode(new Setting.Privacy.DisableHEIP()),
|
||||
new SettingNode(new Setting.Privacy.DisableMSExperiments()),
|
||||
new SettingNode(new Setting.Privacy.InventoryCollector()),
|
||||
new SettingNode(new Setting.Privacy.GetMoreOutOfWindows()),
|
||||
})
|
||||
{
|
||||
//Checked = true,
|
||||
//ToolTipText = "Privacy settings"
|
||||
};
|
||||
|
||||
// Policies > Cortana
|
||||
TreeNode cortana = new TreeNode("Cortana", new TreeNode[] {
|
||||
new SettingNode(new Setting.Cortana.DisableCortana()),
|
||||
new SettingNode(new Setting.Cortana.DisableBing()),
|
||||
new SettingNode(new Setting.Cortana.UninstallCortana()),
|
||||
});
|
||||
|
||||
// Settings > Bloatware
|
||||
TreeNode bloatware = new TreeNode("Bloatware", new TreeNode[] {
|
||||
new SettingNode(new Setting.Bloatware.RemoveUWPAll()),
|
||||
new SettingNode(new Setting.Bloatware.RemoveUWPDefaults()),
|
||||
})
|
||||
{
|
||||
ToolTipText = "Debloat Windows 10"
|
||||
};
|
||||
|
||||
// Settings > App permissions
|
||||
TreeNode apps = new TreeNode("App permissions", new TreeNode[] {
|
||||
new SettingNode(new Setting.Apps.AppNotifications()),
|
||||
new SettingNode(new Setting.Apps.Camera()),
|
||||
new SettingNode(new Setting.Apps.Microphone()),
|
||||
new SettingNode(new Setting.Apps.Call()),
|
||||
new SettingNode(new Setting.Apps.Notifications()),
|
||||
new SettingNode(new Setting.Apps.AccountInfo()),
|
||||
new SettingNode(new Setting.Apps.Contacts()),
|
||||
new SettingNode(new Setting.Apps.Calendar()),
|
||||
new SettingNode(new Setting.Apps.CallHistory()),
|
||||
new SettingNode(new Setting.Apps.Email()),
|
||||
new SettingNode(new Setting.Apps.Tasks()),
|
||||
new SettingNode(new Setting.Apps.Messaging()),
|
||||
new SettingNode(new Setting.Apps.Motion()),
|
||||
new SettingNode(new Setting.Apps.OtherDevices()),
|
||||
new SettingNode(new Setting.Apps.BackgroundApps()),
|
||||
new SettingNode(new Setting.Apps.TrackingApps()),
|
||||
new SettingNode(new Setting.Apps.DiagnosticInformation()),
|
||||
new SettingNode(new Setting.Apps.Documents()),
|
||||
new SettingNode(new Setting.Apps.Pictures()),
|
||||
new SettingNode(new Setting.Apps.Videos()),
|
||||
new SettingNode(new Setting.Apps.Radios()),
|
||||
new SettingNode(new Setting.Apps.FileSystem()),
|
||||
new SettingNode(new Setting.Apps.EyeGaze()),
|
||||
new SettingNode(new Setting.Apps.CellularData()),
|
||||
});
|
||||
|
||||
// Settings > Updates
|
||||
TreeNode updates = new TreeNode("Updates", new TreeNode[] {
|
||||
new SettingNode(new Setting.Updates.DisableUpdates()),
|
||||
new SettingNode(new Setting.Updates.DisableUpdatesSharing()),
|
||||
new SettingNode(new Setting.Updates.BlockMajorUpdates()),
|
||||
});
|
||||
|
||||
// Settings > Gaming
|
||||
TreeNode gaming = new TreeNode("Gaming", new TreeNode[] {
|
||||
new SettingNode(new Setting.Gaming.DisableGameBar()),
|
||||
});
|
||||
|
||||
// Settings > Windows Defender
|
||||
TreeNode defender = new TreeNode("Windows Defender", new TreeNode[] {
|
||||
new SettingNode(new Setting.Defender.DisableSmartScreenStore()),
|
||||
});
|
||||
|
||||
// Settings > Microsoft Edge
|
||||
TreeNode edge = new TreeNode("Microsoft Edge", new TreeNode[] {
|
||||
new SettingNode(new Setting.Edge.DisableAutoFillCredits()),
|
||||
new SettingNode(new Setting.Edge.EdgeBackground()),
|
||||
new SettingNode(new Setting.Edge.DisableSync()),
|
||||
new SettingNode(new Setting.Edge.BlockEdgeRollout()),
|
||||
});
|
||||
|
||||
// Settings > Security
|
||||
TreeNode security = new TreeNode("Security", new TreeNode[] {
|
||||
new SettingNode(new Setting.Security.DisablePassword()),
|
||||
new SettingNode(new Setting.Security.WindowsDRM()),
|
||||
});
|
||||
|
||||
// Add root nodes
|
||||
root.Nodes.AddRange(new TreeNode[]
|
||||
{
|
||||
privacy,
|
||||
cortana,
|
||||
bloatware,
|
||||
apps,
|
||||
updates,
|
||||
gaming,
|
||||
defender,
|
||||
edge,
|
||||
security,
|
||||
});
|
||||
|
||||
TvwSettings.Nodes.Add(root);
|
||||
TvwSettings.ExpandAll();
|
||||
|
||||
// Preselect nodes
|
||||
CheckNodes(privacy);
|
||||
|
||||
// Set up ToolTip text for TvwSettings
|
||||
ToolTip tooltip = new ToolTip();
|
||||
tooltip.AutoPopDelay = 15000;
|
||||
tooltip.IsBalloon = true;
|
||||
tooltip.SetToolTip(this.TvwSettings, "Settings");
|
||||
}
|
||||
|
||||
private List<SettingNode> CollectSettingNodes()
|
||||
{
|
||||
List<SettingNode> selectedSettings = new List<SettingNode>();
|
||||
|
||||
foreach (TreeNode treeNode in TvwSettings.Nodes.All())
|
||||
{
|
||||
if (treeNode.Checked && treeNode.GetType() == typeof(SettingNode))
|
||||
{
|
||||
selectedSettings.Add((SettingNode)treeNode);
|
||||
}
|
||||
}
|
||||
|
||||
_progressIncrement = (int)Math.Floor(100.0f / selectedSettings.Count);
|
||||
|
||||
return selectedSettings;
|
||||
}
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
_progress = 0;
|
||||
_progressIncrement = 0;
|
||||
|
||||
PBar.Visible = true;
|
||||
PBar.Value = 0;
|
||||
LvwStatus.HeaderStyle = ColumnHeaderStyle.Clickable; // Add Header to ListView
|
||||
LvwStatus.Items.Clear();
|
||||
LvwStatus.Refresh();
|
||||
}
|
||||
|
||||
private void IncrementProgress()
|
||||
{
|
||||
_progress += _progressIncrement;
|
||||
PBar.Value = _progress;
|
||||
}
|
||||
|
||||
private void DoProgress(int value)
|
||||
{
|
||||
_progress = value;
|
||||
PBar.Value = _progress;
|
||||
}
|
||||
|
||||
// Check favored parent node including all child nodes
|
||||
public void CheckNodes(TreeNode startNode)
|
||||
{
|
||||
startNode.Checked = true;
|
||||
|
||||
foreach (TreeNode node in startNode.Nodes)
|
||||
|
||||
CheckNodes(node);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Auto check child nodes when parent node is checked
|
||||
/// </summary>
|
||||
private void TvwSetting_AfterCheck(object sender, TreeViewEventArgs e)
|
||||
{
|
||||
TvwSettings.BeginUpdate();
|
||||
|
||||
foreach (TreeNode child in e.Node.Nodes)
|
||||
{
|
||||
child.Checked = e.Node.Checked;
|
||||
}
|
||||
|
||||
TvwSettings.EndUpdate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Method to auto. resize column and set the width to the width of the last item in ListView
|
||||
/// </summary>
|
||||
private void ResizeListViewColumns(ListView lv)
|
||||
{
|
||||
foreach (ColumnHeader column in lv.Columns)
|
||||
{
|
||||
column.Width = -2;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check system for configured settings
|
||||
/// </summary>
|
||||
private async void BtnSettingsAnalyze_Click(object sender, EventArgs e)
|
||||
{
|
||||
Reset();
|
||||
LblStatus.Text = _doWait;
|
||||
BtnSettingsAnalyze.Enabled = false;
|
||||
|
||||
LvwStatus.BeginUpdate();
|
||||
|
||||
List<SettingNode> selectedSettings = CollectSettingNodes();
|
||||
|
||||
foreach (SettingNode node in selectedSettings)
|
||||
{
|
||||
var setting = node.Setting;
|
||||
ListViewItem state = new ListViewItem(node.Parent.Text + ": " + setting.ID());
|
||||
ConfiguredTaskAwaitable<bool> analyzeTask = Task<bool>.Factory.StartNew(() => setting.CheckSetting()).ConfigureAwait(true);
|
||||
|
||||
bool shouldPerform = await analyzeTask;
|
||||
|
||||
if (shouldPerform)
|
||||
{
|
||||
state.SubItems.Add(_failedConfigure);
|
||||
state.BackColor = Color.LavenderBlush;
|
||||
}
|
||||
else
|
||||
{
|
||||
state.SubItems.Add(_successConfigure);
|
||||
state.BackColor = Color.Honeydew;
|
||||
}
|
||||
|
||||
state.Tag = setting;
|
||||
LvwStatus.Items.Add(state);
|
||||
IncrementProgress();
|
||||
}
|
||||
|
||||
DoProgress(100);
|
||||
|
||||
// Summary
|
||||
LblStatus.Text = _finishAnalyze;
|
||||
BtnSettingsAnalyze.Enabled = true;
|
||||
LvwStatus.EndUpdate();
|
||||
|
||||
ResizeListViewColumns(LvwStatus);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Apply selected settings
|
||||
/// </summary>
|
||||
///
|
||||
private async void ApplySettings(List<SettingNode> treeNodes)
|
||||
{
|
||||
BtnSettingsDo.Enabled = false;
|
||||
LvwStatus.BeginUpdate();
|
||||
|
||||
foreach (SettingNode node in treeNodes)
|
||||
{
|
||||
// Add status info
|
||||
LblStatus.Text = _doWait + " (" + node.Text + ")";
|
||||
|
||||
var setting = node.Setting;
|
||||
ConfiguredTaskAwaitable<bool> performTask = Task<bool>.Factory.StartNew(() => setting.DoSetting()).ConfigureAwait(true);
|
||||
|
||||
var result = await performTask;
|
||||
|
||||
var listItem = new ListViewItem(setting.ID());
|
||||
if (result)
|
||||
{
|
||||
listItem.SubItems.Add(_successApply);
|
||||
listItem.BackColor = Color.Honeydew;
|
||||
}
|
||||
else
|
||||
{
|
||||
listItem.SubItems.Add(_failedApply);
|
||||
listItem.BackColor = Color.LavenderBlush;
|
||||
}
|
||||
|
||||
LvwStatus.Items.Add(listItem);
|
||||
IncrementProgress();
|
||||
}
|
||||
|
||||
DoProgress(100);
|
||||
|
||||
LblStatus.Text = _finishApply;
|
||||
BtnSettingsDo.Enabled = true;
|
||||
LvwStatus.EndUpdate();
|
||||
|
||||
ResizeListViewColumns(LvwStatus);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Revert selected settings
|
||||
/// </summary>
|
||||
private async void UndoSettings(List<SettingNode> treeNodes)
|
||||
{
|
||||
LblStatus.Text = _doWait;
|
||||
BtnSettingsUndo.Enabled = false;
|
||||
LvwStatus.BeginUpdate();
|
||||
|
||||
foreach (SettingNode node in treeNodes)
|
||||
{
|
||||
var setting = node.Setting;
|
||||
ConfiguredTaskAwaitable<bool> performTask = Task<bool>.Factory.StartNew(() => setting.UndoSetting()).ConfigureAwait(true);
|
||||
|
||||
var result = await performTask;
|
||||
|
||||
var listItem = new ListViewItem(setting.ID());
|
||||
if (result)
|
||||
{
|
||||
listItem.SubItems.Add(_successApply);
|
||||
listItem.BackColor = Color.Honeydew;
|
||||
}
|
||||
else
|
||||
{
|
||||
listItem.SubItems.Add(_failedApply);
|
||||
listItem.BackColor = Color.LavenderBlush;
|
||||
}
|
||||
|
||||
LvwStatus.Items.Add(listItem);
|
||||
IncrementProgress();
|
||||
}
|
||||
|
||||
DoProgress(100);
|
||||
|
||||
LblStatus.Text = _finishUndo;
|
||||
BtnSettingsUndo.Enabled = true;
|
||||
LvwStatus.EndUpdate();
|
||||
|
||||
ResizeListViewColumns(LvwStatus);
|
||||
}
|
||||
|
||||
private void BtnSettingsDo_Click(object sender, EventArgs e)
|
||||
{
|
||||
Reset();
|
||||
|
||||
List<SettingNode> performNodes = CollectSettingNodes();
|
||||
ApplySettings(performNodes);
|
||||
}
|
||||
|
||||
private void BtnSettingsUndo_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (MessageBox.Show(_undoSettings, this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
|
||||
{
|
||||
Reset();
|
||||
|
||||
List<SettingNode> performNodes = CollectSettingNodes();
|
||||
UndoSettings(performNodes);
|
||||
}
|
||||
}
|
||||
|
||||
private void Info_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("Privatezilla" + "\nVersion " + Program.GetCurrentVersionTostring() + " (Phoenix)" +
|
||||
"\n\nThe open source Windows 10 privacy settings app.\n\nThis is in no way related to Microsoft and a completely independent project.\r\n\n" +
|
||||
"All infos and credits about this project on\n" +
|
||||
"\tgithub.com/builtbybel/privatezilla\r\n\n" +
|
||||
"You can also follow me on\n" +
|
||||
"\ttwitter.com/builtbybel\r\n\n" +
|
||||
"(C#) 2020, Builtbybel",
|
||||
"Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
private void LblMainMenu_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MainMenu.Show(Cursor.Position.X, Cursor.Position.Y);
|
||||
}
|
||||
|
||||
private void CheckRelease_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
WebRequest hreq = WebRequest.Create(_releaseURL);
|
||||
hreq.Timeout = 10000;
|
||||
hreq.Headers.Set("Cache-Control", "no-cache, no-store, must-revalidate");
|
||||
|
||||
WebResponse hres = hreq.GetResponse();
|
||||
StreamReader sr = new StreamReader(hres.GetResponseStream());
|
||||
|
||||
LatestVersion = new Version(sr.ReadToEnd().Trim());
|
||||
|
||||
// Done and dispose!
|
||||
sr.Dispose();
|
||||
hres.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); // Update check failed!
|
||||
}
|
||||
|
||||
var equals = LatestVersion.CompareTo(CurrentVersion);
|
||||
|
||||
if (equals == 0)
|
||||
{
|
||||
MessageBox.Show(_releaseUpToDate, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); // Up-to-date
|
||||
}
|
||||
else if (equals < 0)
|
||||
{
|
||||
MessageBox.Show(_releaseUnofficial, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); // Unofficial
|
||||
}
|
||||
else // New release available!
|
||||
{
|
||||
if (MessageBox.Show("There is a new version available #" + LatestVersion + "\nYour are using version #" + CurrentVersion + "\n\nDo you want to open the @github/releases page?", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) // New release available!
|
||||
{
|
||||
Process.Start("https://github.com/builtbybel/privatezilla/releases/tag/" + LatestVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Help_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show(_helpApp, Help.Text, MessageBoxButtons.OK, MessageBoxIcon.Question);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Populate Setting files to Navigation > settings > LstPopulatePS
|
||||
/// </summary>
|
||||
private void PopulatePS()
|
||||
{
|
||||
// Switch to More
|
||||
PnlPS.Visible = true;
|
||||
LstPS.Visible = true;
|
||||
|
||||
PnlSettings.Visible = false;
|
||||
TvwSettings.Visible = false;
|
||||
|
||||
// Clear list
|
||||
LstPS.Items.Clear();
|
||||
|
||||
DirectoryInfo dirs = new DirectoryInfo(@"scripts");
|
||||
FileInfo[] listSettings = dirs.GetFiles("*.ps1");
|
||||
foreach (FileInfo fi in listSettings)
|
||||
{
|
||||
LstPS.Items.Add(Path.GetFileNameWithoutExtension(fi.Name));
|
||||
LstPS.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void LblPS_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
// Show Info about feature
|
||||
try
|
||||
{
|
||||
StreamReader OpenFile = new StreamReader(@"scripts\" + "readme.txt");
|
||||
MessageBox.Show(OpenFile.ReadToEnd(), "Info about this feature", MessageBoxButtons.OK);
|
||||
OpenFile.Close();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
// Refresh
|
||||
PopulatePS();
|
||||
}
|
||||
|
||||
private void LblSettings_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
// Switch to Setting
|
||||
PnlSettings.Visible = true;
|
||||
TvwSettings.Visible = true;
|
||||
|
||||
PnlPS.Visible = false;
|
||||
LstPS.Visible = false;
|
||||
}
|
||||
|
||||
private void LstPS_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
string psdir = @"scripts\" + LstPS.Text + ".ps1";
|
||||
|
||||
//Read PS content line by line
|
||||
try
|
||||
{
|
||||
using (StreamReader sr = new StreamReader(@"scripts\" + LstPS.Text + ".ps1", Encoding.Default))
|
||||
{
|
||||
StringBuilder content = new StringBuilder();
|
||||
|
||||
// writes line by line to the StringBuilder until the end of the file is reached
|
||||
while (!sr.EndOfStream)
|
||||
content.AppendLine(sr.ReadLine());
|
||||
|
||||
// View Code
|
||||
TxtConsolePS.Text = content.ToString();
|
||||
|
||||
// View Info
|
||||
TxtPSInfo.Text = _psInfo + string.Join(Environment.NewLine, System.IO.File.ReadAllLines(psdir).Where(s => s.StartsWith("###")).Select(s => s.Substring(3).Replace("###", "\r\n\n")));
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Run custom PowerShell scripts
|
||||
/// </summary>
|
||||
private void BtnDoPS_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (LstPS.CheckedItems.Count == 0)
|
||||
{
|
||||
MessageBox.Show(_psSelect, BtnDoPS.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
for (int i = 0; i < LstPS.Items.Count; i++)
|
||||
{
|
||||
if (LstPS.GetItemChecked(i))
|
||||
{
|
||||
LstPS.SelectedIndex = i;
|
||||
BtnDoPS.Text = "Processing";
|
||||
PnlPS.Enabled = false;
|
||||
|
||||
//TxtOutputPS.Clear();
|
||||
using (PowerShell powerShell = PowerShell.Create())
|
||||
{
|
||||
powerShell.AddScript(TxtConsolePS.Text);
|
||||
powerShell.AddCommand("Out-String");
|
||||
Collection<PSObject> PSOutput = powerShell.Invoke();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
foreach (PSObject pSObject in PSOutput)
|
||||
stringBuilder.AppendLine(pSObject.ToString());
|
||||
|
||||
TxtOutputPS.Text = stringBuilder.ToString();
|
||||
|
||||
BtnDoPS.Text = "Apply";
|
||||
PnlPS.Enabled = true;
|
||||
}
|
||||
|
||||
// Done!
|
||||
MessageBox.Show("Script " + "\"" + LstPS.Text + "\" " + _psSuccess, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Open PowerShell code view
|
||||
/// </summary>
|
||||
private void ChkCodePS_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (ChkCodePS.Checked == true)
|
||||
{
|
||||
ChkCodePS.Text = "Back";
|
||||
TxtConsolePS.Visible = true;
|
||||
TxtOutputPS.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
ChkCodePS.Text = "View code";
|
||||
TxtOutputPS.Visible = true;
|
||||
TxtConsolePS.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Import PowerShell script files
|
||||
/// </summary>
|
||||
private void PSImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog();
|
||||
|
||||
ofd.Filter = "*.txt|*.txt|*.ps1|*.ps1";
|
||||
ofd.DefaultExt = ".ps1";
|
||||
ofd.RestoreDirectory = true;
|
||||
ofd.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
|
||||
ofd.FilterIndex = 2;
|
||||
|
||||
string strDestPath = Application.StartupPath + @"\scripts";
|
||||
ofd.Multiselect = true;
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
foreach (string fileName in ofd.FileNames)
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Copy(fileName, strDestPath + @"\" + Path.GetFileName(fileName));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{ MessageBox.Show(ex.Message, this.Text); }
|
||||
}
|
||||
}
|
||||
|
||||
// Refresh
|
||||
PopulatePS();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save opened PowerShell script files as new preset script files
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void PSSaveAs_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (ChkCodePS.Checked == false)
|
||||
{
|
||||
MessageBox.Show(_psSave, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
else
|
||||
{
|
||||
SaveFileDialog dlg = new SaveFileDialog();
|
||||
dlg.Filter = "*.txt|*.txt|*.ps1|*.ps1";
|
||||
dlg.DefaultExt = ".ps1";
|
||||
dlg.RestoreDirectory = true;
|
||||
dlg.InitialDirectory = Application.StartupPath + @"\scripts";
|
||||
dlg.FilterIndex = 2;
|
||||
|
||||
try
|
||||
{
|
||||
if (dlg.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
File.WriteAllText(dlg.FileName, TxtConsolePS.Text, Encoding.UTF8);
|
||||
//Refresh
|
||||
PopulatePS();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void PSMarketplace_Click(object sender, EventArgs e)
|
||||
{
|
||||
Process.Start("http://www.builtbybel.com/marketplace");
|
||||
}
|
||||
|
||||
private void CommunityPkg_Click(object sender, EventArgs e)
|
||||
{
|
||||
Process.Start("https://github.com/builtbybel/privatezilla#community-package");
|
||||
}
|
||||
|
||||
// Check if community package installed
|
||||
private void CommunityPackageAvailable()
|
||||
{
|
||||
string path = @"scripts";
|
||||
if (Directory.Exists(path))
|
||||
{
|
||||
LblPS.Visible = true;
|
||||
CommunityPkg.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private bool sortAscending = false;
|
||||
|
||||
private void LvwStatus_ColumnClick(object sender, ColumnClickEventArgs e)
|
||||
{
|
||||
if (!sortAscending)
|
||||
{
|
||||
sortAscending = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
sortAscending = false;
|
||||
}
|
||||
this.LvwStatus.ListViewItemSorter = new ListViewItemComparer(e.Column, sortAscending);
|
||||
}
|
||||
|
||||
private void BtnMenuPS_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.PSMenu.Show(Cursor.Position.X, Cursor.Position.Y);
|
||||
}
|
||||
|
||||
private void PicOpenGitHubPage_Click(object sender, EventArgs e)
|
||||
{
|
||||
Process.Start("https://github.com/builtbybel/privatezilla");
|
||||
}
|
||||
}
|
||||
}
|
186
src/Privatezilla/MainWindow.resx
vendored
Normal file
186
src/Privatezilla/MainWindow.resx
vendored
Normal file
|
@ -0,0 +1,186 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="MainMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="CommunityPkg.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAABGdBTUEAALGPC/xhBQAAAHtJREFUOE/t
|
||||
kkEKg0AQBPclnvQXCjnrmwKiT8s17/ADetdqsgMreHDHEAhYUNDMMH2a8CsKHHGI2c0T16iymx6tSNnN
|
||||
XXRMhS9844RWpKyZdiWeosYZrcTUTLssGkzLXCWGyhZUifIlOmw/8R9J/yXX3X89UAOPuv0WIWxtST6A
|
||||
yKRghgAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PnlNav.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="PicOpenGitHubPage.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAAiJJREFUSEvd
|
||||
lU1r1FAYheMHSgUVVyIIBVvQYW5SsG66c9GFqC0qfiG69leoWXRyb6R2oRuhIH6s9AeI+/6CopaRYSY3
|
||||
Yy2CUHRh3RnPHc9M7k0npLPUB14m855z3klykzve/0127c0eLdQF7atn2perqE3WaurL54mQN4yH9tHA
|
||||
gFkM+oTKKqqdBmqOsWoyL9uF0D3Ub2tIVRnvkslyTDk6kIuF8AilHnHMcMyluoFoRgt5Gcdrbr9X7VSo
|
||||
6526mnL70XmOc8nOhnthaNlm0zPa55mlsa6Iz2BdjpjSQeN0e1odtnLWD8jmx3q4z2gO3SCaLxizTm1h
|
||||
nHIpHdE4WswNXXTc+5cFY8ucOeVSNqbDA8ZrZ/H4vqCcA+GDY/KjS5Qq4ToNsqj3lHJg+mabWpPhIUqV
|
||||
GK+dRW1SykHzh21qnowPUqrELLidRW1RykHTuUVpEF2lVEkSqJt2Fu9Dh1IOhFeuSa5jHU5RLkWLuAbv
|
||||
hp1F7jXlHC2iK7aJ9TP11X08+ydoG9AVDydSIR/As1XIZHgBb9OWY14OiH8fNyEX8Pm2H0A9oW0AesUr
|
||||
7tfX1uTj/bS5pCK6CIPZuH6tB/FxfH+H4++61jhGy4B0StU50Clk7tAynMRXcc/oR5KtofT+KwrDceXL
|
||||
lTuqMSS+VAytIbRCaRv2cJzQ0/7etSOSQJ5DsGnCbG2Dw7/gsbzF1mhkXri7dPsFuJ13d7Jf/ct43h8o
|
||||
1jKqDLJlDQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>229, 19</value>
|
||||
</metadata>
|
||||
<data name="TxtPSInfo.Text" xml:space="preserve">
|
||||
<value>Welcome to the Modern Policy Editor, which allows you to apply group policies and custom settings in the form of PowerShell scripts and templates (bundled scripts).
|
||||
|
||||
Select a script to view it's description.
|
||||
|
||||
To check the code for vulnerabilities click on "View code".
|
||||
|
||||
To obtain new objects (templates, scripts etc.) visit the Marketplace in the upper right menu. Privatezilla uses the Marketplace of the app "SharpApp". Since this app is from the same developer and the scripting is based upon Powershell, they are also compatible with each other.
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="PSMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>132, 19</value>
|
||||
</metadata>
|
||||
<data name="PSMarketplace.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
|
||||
EwAACxMBAJqcGAAAAohJREFUOE+Fkt1LU3EYx09ms9S0TEtNZ7kXnbYoKeiquhKK3QSZIFQU1b9QgReS
|
||||
JV3VZcKZmzPnjuf4BqbTuujlwjBpitHS7bxOjQVqBBoR1dPznM7y0IoeOPwObN/P5zy/52H+rOqQ1OQS
|
||||
lHEXrz6xhZSJwm7NY/z0/6oWlJMuQe1xcuI1BycPlwfl5n0hZQlPnml5mmn87d9VI6g+JycddfLqMAOw
|
||||
qX48mePqldkaXpu0c/JUZUiLWYPKOgJfVgSVe3YuYTOiDNPAv7XUDWgTdYOaH89X7n4tWsWr3/ALAAOw
|
||||
F5/ibgmKuiTYhc+OThHyA0oj4x5QThwbSsweGUx8cQsqYO/g7FXBzimwH8MVPTKUYbikW4Y9DyUoxHBB
|
||||
QIJ8BOT6xEamtk+5eKhfA3efBtgCVCPA0auADQF2ToX6kUU4PKDp9t0IIPvOgAh5ZsBBDB/A8JnH76Ft
|
||||
egWap5bBP/8Jvn7/AVRXX3xIs2/3i7CtI35OB5C9FgHjC+t6IIznaOLXO9WV58l0ewrgErQLZKfe786s
|
||||
whiG26ZX4TZ+yUhiDR5pa3A6vKRfntme7YtvAMhOvROA7HcQ0BpBAIYJcCq8mG5HgMUfb2CcvHae7FV4
|
||||
82SnGkUz2VN1GVsgO40uZd/aYQKQnUbnGVuCW69X4PrkMnjnNi7x0rNkmj0LAZu9BoDsNPdKY+60OKU4
|
||||
dzqPDy9ge8pve45P1O1bvAbAwUtNZKe50+JYTYtDN0+jI7u+OCZ7ZgpAVd4RKbX6ZjzWzvmbZYG5YGkg
|
||||
Nl3cFftchMHU2prtFgqzMWDY+Fkd8NdqgYyC9khNfvubxjxvtDWXjQ5ls/PxLHbuY2b7u3DGg9kbzP1o
|
||||
yU9i5UnNIXoRFwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>87</value>
|
||||
</metadata>
|
||||
</root>
|
184
src/Privatezilla/Privatezilla.csproj
vendored
Normal file
184
src/Privatezilla/Privatezilla.csproj
vendored
Normal file
|
@ -0,0 +1,184 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{1CF5392E-0522-49D4-8343-B732BE762086}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>Privatezilla</RootNamespace>
|
||||
<AssemblyName>Privatezilla</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'x64|AnyCPU'">
|
||||
<OutputPath>bin\x64\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'x64|x64'">
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<OutputPath>bin\x64\x64\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Management.Automation\v4.0_3.0.0.0__31bf3856ad364e35\System.Management.Automation.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ServiceModel" />
|
||||
<Reference Include="System.Transactions" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Helpers\WindowsHelper.cs" />
|
||||
<Compile Include="Interfaces\IListView.cs" />
|
||||
<Compile Include="Settings\Apps\AccountInfo.cs" />
|
||||
<Compile Include="Settings\Apps\AppNotifications.cs" />
|
||||
<Compile Include="Settings\Apps\BackgroundApps.cs" />
|
||||
<Compile Include="Settings\Apps\Calendar.cs" />
|
||||
<Compile Include="Settings\Apps\Call.cs" />
|
||||
<Compile Include="Settings\Apps\CallHistory.cs" />
|
||||
<Compile Include="Settings\Apps\CellularData.cs" />
|
||||
<Compile Include="Settings\Apps\Contacts.cs" />
|
||||
<Compile Include="Settings\Apps\DiagnosticInformation.cs" />
|
||||
<Compile Include="Settings\Apps\Documents.cs" />
|
||||
<Compile Include="Settings\Apps\Email.cs" />
|
||||
<Compile Include="Settings\Apps\FileSystem.cs" />
|
||||
<Compile Include="Settings\Apps\EyeGaze.cs" />
|
||||
<Compile Include="Settings\Bloatware\RemoveUWPDefaults.cs" />
|
||||
<Compile Include="Settings\Defender\DisableSmartScreenStore.cs" />
|
||||
<Compile Include="Settings\Edge\BlockEdgeRollout.cs" />
|
||||
<Compile Include="Settings\Privacy\DisableCEIP.cs" />
|
||||
<Compile Include="Settings\Privacy\GetMoreOutOfWindows.cs" />
|
||||
<Compile Include="Settings\Privacy\DisableHEIP.cs" />
|
||||
<Compile Include="Settings\Privacy\DisableMSExperiments.cs" />
|
||||
<Compile Include="Settings\Privacy\DisableTipsLockScreen.cs" />
|
||||
<Compile Include="Settings\Privacy\InstalledApps.cs" />
|
||||
<Compile Include="Settings\Apps\Messaging.cs" />
|
||||
<Compile Include="Settings\Apps\Microphone.cs" />
|
||||
<Compile Include="Settings\Apps\Motion.cs" />
|
||||
<Compile Include="Settings\Apps\Notifications.cs" />
|
||||
<Compile Include="Settings\Apps\OtherDevices.cs" />
|
||||
<Compile Include="Settings\Apps\Pictures.cs" />
|
||||
<Compile Include="Settings\Apps\Radios.cs" />
|
||||
<Compile Include="Settings\Cortana\UninstallCortana.cs" />
|
||||
<Compile Include="Settings\Privacy\InventoryCollector.cs" />
|
||||
<Compile Include="Settings\Privacy\SuggestedContent.cs" />
|
||||
<Compile Include="Settings\Bloatware\RemoveUWPAll.cs" />
|
||||
<Compile Include="Settings\Privacy\SuggestedApps.cs" />
|
||||
<Compile Include="Settings\Apps\Tasks.cs" />
|
||||
<Compile Include="Settings\Apps\TrackingApps.cs" />
|
||||
<Compile Include="Settings\Apps\Videos.cs" />
|
||||
<Compile Include="Settings\Apps\Camera.cs" />
|
||||
<Compile Include="Settings\Edge\AutoFillCredits.cs" />
|
||||
<Compile Include="Settings\Edge\DisableSync.cs" />
|
||||
<Compile Include="Settings\Edge\EdgeBackground.cs" />
|
||||
<Compile Include="Settings\Gaming\GameBar.cs" />
|
||||
<Compile Include="Settings\Privacy\DiagnosticData.cs" />
|
||||
<Compile Include="Settings\Privacy\DisableAds.cs" />
|
||||
<Compile Include="Settings\Cortana\DisableBing.cs" />
|
||||
<Compile Include="Settings\Privacy\DisableBiometrics.cs" />
|
||||
<Compile Include="Settings\Privacy\DisableCompTelemetry.cs" />
|
||||
<Compile Include="Settings\Privacy\DisableFeedback.cs" />
|
||||
<Compile Include="Settings\Privacy\DisableLocation.cs" />
|
||||
<Compile Include="Settings\Privacy\DisableTimeline.cs" />
|
||||
<Compile Include="Settings\Privacy\DisableTips.cs" />
|
||||
<Compile Include="Settings\Privacy\DisableWiFi.cs" />
|
||||
<Compile Include="Settings\Privacy\HandwritingData.cs" />
|
||||
<Compile Include="Helpers\RegistryHelper.cs" />
|
||||
<Compile Include="Interfaces\ITreeNode.cs" />
|
||||
<Compile Include="MainWindow.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow.Designer.cs">
|
||||
<DependentUpon>MainWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Settings\Security\DisablePassword.cs" />
|
||||
<Compile Include="Settings\Security\WindowsDRM.cs" />
|
||||
<Compile Include="Settings\Updates\BlockMajorUpdates.cs" />
|
||||
<Compile Include="Settings\Updates\DisableUpdates.cs" />
|
||||
<Compile Include="Settings\Updates\UpdatesSharing.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Helpers\SettingsNode.cs" />
|
||||
<Compile Include="Settings\Cortana\DisableCortana.cs" />
|
||||
<Compile Include="Helpers\SetttingsBase.cs" />
|
||||
<Compile Include="Settings\Privacy\DisableTelemetry.cs" />
|
||||
<EmbeddedResource Include="MainWindow.resx">
|
||||
<DependentUpon>MainWindow.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="app.manifest" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<Content Include="icon.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
31
src/Privatezilla/Program.cs
vendored
Normal file
31
src/Privatezilla/Program.cs
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Privatezilla
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
|
||||
internal static string GetCurrentVersionTostring() => new Version(Application.ProductVersion).ToString(3);
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
if (Environment.OSVersion.Version.Build < 9200)
|
||||
|
||||
MessageBox.Show("You are running Privatezilla on a system older than Windows 10. Privatezilla is limited to Windows 10 ONLY.", "Privatezilla", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
else
|
||||
Application.Run(new MainWindow());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
36
src/Privatezilla/Properties/AssemblyInfo.cs
vendored
Normal file
36
src/Privatezilla/Properties/AssemblyInfo.cs
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die einer Assembly zugeordnet sind.
|
||||
[assembly: AssemblyTitle("Privatezilla")]
|
||||
[assembly: AssemblyDescription("The alternate Windows 10 privacy settings app")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Builtbybel")]
|
||||
[assembly: AssemblyProduct("Privatezilla")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyTrademark("Privatezilla")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
|
||||
// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
|
||||
// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
[assembly: Guid("1cf5392e-0522-49d4-8343-b732be762086")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
// 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.30.0")]
|
||||
[assembly: AssemblyFileVersion("0.30.0")]
|
63
src/Privatezilla/Properties/Resources.Designer.cs
generated
vendored
Normal file
63
src/Privatezilla/Properties/Resources.Designer.cs
generated
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Privatezilla.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Privatezilla.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
117
src/Privatezilla/Properties/Resources.resx
vendored
Normal file
117
src/Privatezilla/Properties/Resources.resx
vendored
Normal file
|
@ -0,0 +1,117 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
26
src/Privatezilla/Properties/Settings.Designer.cs
generated
vendored
Normal file
26
src/Privatezilla/Properties/Settings.Designer.cs
generated
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Privatezilla.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.5.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
src/Privatezilla/Properties/Settings.settings
vendored
Normal file
7
src/Privatezilla/Properties/Settings.settings
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
54
src/Privatezilla/Settings/Apps/AccountInfo.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/AccountInfo.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class AccountInfo : SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userAccountInformation";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to account info";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/AppNotifications.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/AppNotifications.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class AppNotifications : SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PushNotifications";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app notifications";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "The Action Center in Windows 10 collects and shows notifications and alerts from traditional Windows applications and system notifications, alongside those generated from modern apps.\nNotifications are then grouped in the Action Center by app and time.\nThis setting will disable all notifications from apps and other senders in settings.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(AppKey, "ToastEnabled", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "ToastEnabled", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "ToastEnabled", "1", RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/BackgroundApps.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/BackgroundApps.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class BackgroundApps: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications";
|
||||
private const int DesiredValue =1;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable apps running in background";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "Windows 10 apps have no more permission to run in the background so they can't update their live tiles, fetch new data, and receive notifications.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(AppKey, "GlobalUserDisabled", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "GlobalUserDisabled", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "GlobalUserDisabled", 0, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/Calendar.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/Calendar.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class Calendar : SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\appointments";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to calendar";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/Call.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/Call.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class Call: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\phoneCall";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to call";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/CallHistory.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/CallHistory.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class CallHistory: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\phoneCallHistory";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to call history";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/Camera.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/Camera.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class Camera: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\webcam";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to camera";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/CellularData.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/CellularData.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class CellularData : SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\cellularData";
|
||||
private const string DesiredValue = "Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to cellular data";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "Some Windows 10 devices have a SIM card and/or eSIM in them that lets you connect to a cellular data network (aka: LTE or Broadband), so you can get online in more places by using a cellular signal.\nIf you do not want any apps to be allowed to use cellular data, you can disable it with this setting.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/Contacts.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/Contacts.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class Contacts : SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\contacts";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to contacts";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/DiagnosticInformation.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/DiagnosticInformation.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class DiagnosticInformation: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\appDiagnostics";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to diagnostics";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/Documents.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/Documents.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class Documents: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\documentsLibrary";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to documents";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/Email.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/Email.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class Email : SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\email";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to email";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/EyeGaze.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/EyeGaze.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class EyeGaze : SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\gazeInput";
|
||||
private const string DesiredValue = "Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to eye tracking";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "Disable app access to eye-gaze-based interaction";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/FileSystem.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/FileSystem.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class FileSystem: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\broadFileSystemAccess";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to file system";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "This setting will disable app access to file system. Some apps may be restricted in their function or may no longer work at all.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/Messaging.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/Messaging.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class Messaging: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\chat";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to messaging";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/Microphone.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/Microphone.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class Microphone: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\microphone";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to microphone";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/Motion.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/Motion.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class Motion: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\activity";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to motion";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/Notifications.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/Notifications.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class Notifications: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userNotificationListener";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to notifications";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
57
src/Privatezilla/Settings/Apps/OtherDevices.cs
vendored
Normal file
57
src/Privatezilla/Settings/Apps/OtherDevices.cs
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class OtherDevices: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\bluetooth";
|
||||
private const string AppKey2 = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\bluetoothSync";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to other devices";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue) &&
|
||||
RegistryHelper.StringEquals(AppKey2, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
Registry.SetValue(AppKey2, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/Pictures.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/Pictures.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class Pictures: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\picturesLibrary";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to pictures";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/Radios.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/Radios.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class Radios: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\radios";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to radios";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/Tasks.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/Tasks.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class Tasks: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\userDataTasks";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to tasks";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/TrackingApps.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/TrackingApps.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class TrackingApps: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable tracking of app starts";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "This allows you to quickly have access to your list of Most used apps both in the Start menu and when you search your device.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(AppKey, "Start_TrackProgs", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Start_TrackProgs", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Start_TrackProgs", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Apps/Videos.cs
vendored
Normal file
54
src/Privatezilla/Settings/Apps/Videos.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Apps
|
||||
{
|
||||
internal class Videos: SettingBase
|
||||
{
|
||||
private const string AppKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\videosLibrary";
|
||||
private const string DesiredValue ="Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable app access to videos";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(AppKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AppKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
72
src/Privatezilla/Settings/Bloatware/RemoveUWPAll.cs
vendored
Normal file
72
src/Privatezilla/Settings/Bloatware/RemoveUWPAll.cs
vendored
Normal file
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using System.Management.Automation;
|
||||
using System.IO;
|
||||
|
||||
namespace Privatezilla.Setting.Bloatware
|
||||
{
|
||||
internal class RemoveUWPAll : SettingBase
|
||||
{
|
||||
public override string ID()
|
||||
{
|
||||
return "Remove all built-in apps";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "This will remove all built-in apps except Microsoft Store.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
// NOTE! OPTIMIZE
|
||||
// Check if app Windows.Photos exists and return true as not configured
|
||||
var appPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Packages", "Microsoft.Windows.Photos_8wekyb3d8bbwe");
|
||||
|
||||
if (Directory.Exists(appPath))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
using (PowerShell script = PowerShell.Create())
|
||||
{
|
||||
script.AddScript("Get-appxprovisionedpackage –online | where-object {$_.packagename –notlike “*store*”} | Remove-AppxProvisionedPackage –online");
|
||||
script.AddScript("Get-AppxPackage | where-object {$_.name –notlike “*store*”} | Remove-AppxPackage");
|
||||
|
||||
try
|
||||
{
|
||||
script.Invoke();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
using (PowerShell script = PowerShell.Create())
|
||||
{
|
||||
script.AddScript("Get-AppxPackage -AllUsers| Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\\AppXManifest.xml”}");
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
script.Invoke();
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
71
src/Privatezilla/Settings/Bloatware/RemoveUWPDefaults.cs
vendored
Normal file
71
src/Privatezilla/Settings/Bloatware/RemoveUWPDefaults.cs
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using System.Management.Automation;
|
||||
using System.IO;
|
||||
|
||||
namespace Privatezilla.Setting.Bloatware
|
||||
{
|
||||
internal class RemoveUWPDefaults : SettingBase
|
||||
{
|
||||
public override string ID()
|
||||
{
|
||||
return "Remove all built-in apps except defaults";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "This will remove all built-in apps except the following:\nMicrosoft Store\nApp Installer\nCalendar\nMail\nCalculator\nCamera\nSkype\nGroove Music\nMaps\nPaint 3D\nYour Phone\nPhotos\nSticky Notes\nWeather\nXbox";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
// NOTE! OPTIMIZE
|
||||
// Check if app Windows.Photos exists and return false as configured
|
||||
var appPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Packages", "Microsoft.Windows.Photos_8wekyb3d8bbwe");
|
||||
|
||||
if (Directory.Exists(appPath))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
using (PowerShell script = PowerShell.Create())
|
||||
{
|
||||
script.AddScript("Get-appxprovisionedpackage –online | where-object {$_.packagename –notlike “*store*” -and $_.packagename –notlike “*appinstaller*” -and $_.packagename –notlike “*calculator*” -and $_.packagename –notlike “*photos*” -and $_.packagename –notlike “*sticky*” -and $_.packagename –notlike “*skypeapp*” -and $_.packagename –notlike “*alarms*” -and $_.packagename –notlike “*maps*” -and $_.packagename –notlike “*camera*” -and $_.packagename –notlike “*xbox*” -and $_.packagename –notlike “*communicationssapps*” -and $_.packagename –notlike “*zunemusic*” -and $_.packagename –notlike “*mspaint*” -and $_.packagename –notlike “*yourphone*” -and $_.packagename –notlike “*bingweather*”} | Remove-AppxProvisionedPackage –online");
|
||||
script.AddScript("Get-AppxPackage | where-object {$_.name –notlike “*store*” -and $_.name –notlike “*appinstaller*” -and $_.name –notlike “*calculator*” -and $_.name –notlike “*photos*” -and $_.name –notlike “*sticky*” -and $_.name –notlike “*skypeapp*” -and $_.name –notlike“*alarms*” -and $_.name –notlike “*maps*” -and $_.name –notlike “*camera*” -and $_.name –notlike “*xbox*” -and $_.name –notlike “*communicationssapps*” -and $_.name –notlike “*zunemusic*” -and $_.name –notlike “*mspaint*” -and $_.name –notlike “*yourphone*” -and $_.name –notlike “*bingweather*”} | Remove-AppxPackage");
|
||||
|
||||
try
|
||||
{
|
||||
script.Invoke();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
using (PowerShell script = PowerShell.Create())
|
||||
{
|
||||
script.AddScript("Get-AppxPackage -AllUsers| Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\\AppXManifest.xml”}");
|
||||
|
||||
try
|
||||
{
|
||||
script.Invoke();
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
64
src/Privatezilla/Settings/Cortana/DisableBing.cs
vendored
Normal file
64
src/Privatezilla/Settings/Cortana/DisableBing.cs
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Cortana
|
||||
{
|
||||
internal class DisableBing : SettingBase
|
||||
{
|
||||
private const string BingKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Windows Search";
|
||||
private const string Bing2004Key = @"HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer"; //Disable Websearch on W1indows 10, version >=2004
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Bing in Windows Search";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "Windows 10, by default, sends everything you search for in the Start Menu to their servers to give you results from Bing search.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
|
||||
{
|
||||
string releaseid = Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "ReleaseId", "").ToString();
|
||||
|
||||
if (releaseid != "2004")
|
||||
return !(RegistryHelper.IntEquals(BingKey, "BingSearchEnabled", DesiredValue));
|
||||
|
||||
else
|
||||
return !(RegistryHelper.IntEquals(Bing2004Key, "DisableSearchBoxSuggestions", 1));
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(BingKey, "BingSearchEnabled", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(Bing2004Key, "DisableSearchBoxSuggestions", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(BingKey, "BingSearchEnabled", 1, RegistryValueKind.DWord);
|
||||
Registry.SetValue(Bing2004Key, "DisableSearchBoxSuggestions", 0, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Cortana/DisableCortana.cs
vendored
Normal file
54
src/Privatezilla/Settings/Cortana/DisableCortana.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Cortana
|
||||
{
|
||||
internal class DisableCortana : SettingBase
|
||||
{
|
||||
private const string CortanaKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Windows Search";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Cortana";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "Cortana is Microsoft's virtual assistant that comes integrated into Windows 10.\nThis setting will disable Cortana permanently and prevent it from recording and storing your search habits and history.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(CortanaKey, "AllowCortana", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(CortanaKey, "AllowCortana", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(CortanaKey, "AllowCortana", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
70
src/Privatezilla/Settings/Cortana/UninstallCortana.cs
vendored
Normal file
70
src/Privatezilla/Settings/Cortana/UninstallCortana.cs
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
using System;
|
||||
using System.Management.Automation;
|
||||
using System.IO;
|
||||
|
||||
namespace Privatezilla.Setting.Cortana
|
||||
{
|
||||
internal class UninstallCortana : SettingBase
|
||||
{
|
||||
public override string ID()
|
||||
{
|
||||
return "Uninstall Cortana";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "This will uninstall the new Cortana app on Windows 10, version 2004.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
// Cortana Package ID on Windows 10, version 2004 is *Microsoft.549981C3F5F10*
|
||||
var appPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Packages", "Microsoft.549981C3F5F10");
|
||||
|
||||
if (Directory.Exists(appPath))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
using (PowerShell script = PowerShell.Create())
|
||||
{
|
||||
script.AddScript("Get-appxpackage *Microsoft.549981C3F5F10* | Remove-AppxPackage");
|
||||
|
||||
try
|
||||
{
|
||||
script.Invoke();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
using (PowerShell script = PowerShell.Create())
|
||||
{
|
||||
script.AddScript("Get-AppXPackage -Name Microsoft.Windows.Cortana | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register \"$($_.InstallLocation)AppXManifest.xml}\"");
|
||||
|
||||
try
|
||||
{
|
||||
script.Invoke();
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
57
src/Privatezilla/Settings/Defender/DisableSmartScreenStore.cs
vendored
Normal file
57
src/Privatezilla/Settings/Defender/DisableSmartScreenStore.cs
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
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 "Disable SmartScreen for Store Apps";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "Windows Defender SmartScreen Filter helps protect your device by checking web content (URLs) that Microsoft Store apps use.";
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Edge/AutoFillCredits.cs
vendored
Normal file
54
src/Privatezilla/Settings/Edge/AutoFillCredits.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Edge
|
||||
{
|
||||
internal class DisableAutoFillCredits : SettingBase
|
||||
{
|
||||
private const string EdgeKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Edge";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable AutoFill for credit cards";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "Microsoft Edge's AutoFill feature lets users auto complete credit card information in web forms using previously stored information.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(EdgeKey, "AutofillCreditCardEnabled", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(EdgeKey, "AutofillCreditCardEnabled", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(EdgeKey, "AutofillCreditCardEnabled", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Edge/BlockEdgeRollout.cs
vendored
Normal file
54
src/Privatezilla/Settings/Edge/BlockEdgeRollout.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Edge
|
||||
{
|
||||
internal class BlockEdgeRollout : SettingBase
|
||||
{
|
||||
private const string EdgeKey = @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EdgeUpdate";
|
||||
private const int DesiredValue = 1;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Block Installation of New Microsoft Edge";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "This will block Windows 10 Update Force Installing of the new Chromium-based Microsoft Edge web browser if it's not installed already on the device.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(EdgeKey, "DoNotUpdateToEdgeWithChromium", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(EdgeKey, "DoNotUpdateToEdgeWithChromium", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(EdgeKey, "DoNotUpdateToEdgeWithChromium", 0, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Edge/DisableSync.cs
vendored
Normal file
54
src/Privatezilla/Settings/Edge/DisableSync.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Edge
|
||||
{
|
||||
internal class DisableSync : SettingBase
|
||||
{
|
||||
private const string EdgeKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Edge";
|
||||
private const int DesiredValue = 1;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable synchronization of data";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "This setting will disable synchronization of data using Microsoft sync services.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(EdgeKey, "SyncDisabled", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(EdgeKey, "SyncDisabled", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(EdgeKey, "SyncDisabled", 0, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Edge/EdgeBackground.cs
vendored
Normal file
54
src/Privatezilla/Settings/Edge/EdgeBackground.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Edge
|
||||
{
|
||||
internal class EdgeBackground : SettingBase
|
||||
{
|
||||
private const string EdgeKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Edge";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Prevent Edge running in background";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "On the new Chromium version of Microsoft Edge, extensions and other services can keep the browser running in the background even after it's closed.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(EdgeKey, "BackgroundModeEnabled", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(EdgeKey, "BackgroundModeEnabled", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(EdgeKey, "BackgroundModeEnabled", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Gaming/GameBar.cs
vendored
Normal file
54
src/Privatezilla/Settings/Gaming/GameBar.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Gaming
|
||||
{
|
||||
internal class DisableGameBar : SettingBase
|
||||
{
|
||||
private const string GameBarKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\GameDVR";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Game Bar features";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "This setting will disable the Windows Game Recording and Broadcasting.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(GameBarKey, "AllowGameDVR", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(GameBarKey, "AllowGameDVR", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(GameBarKey, "AllowGameDVR", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
55
src/Privatezilla/Settings/Privacy/DiagnosticData.cs
vendored
Normal file
55
src/Privatezilla/Settings/Privacy/DiagnosticData.cs
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DiagnosticData : SettingBase
|
||||
{
|
||||
private const string DiagnosticKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Privacy";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Prevent using diagnostic data";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "This will turn off tailored experiences with relevant tips and recommendations by using your diagnostics data. Many people would call this telemetry, or even spying.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(DiagnosticKey, "TailoredExperiencesWithDiagnosticDataEnabled", DesiredValue)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(DiagnosticKey, "TailoredExperiencesWithDiagnosticDataEnabled", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(DiagnosticKey, "TailoredExperiencesWithDiagnosticDataEnabled", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Privacy/DisableAds.cs
vendored
Normal file
54
src/Privatezilla/Settings/Privacy/DisableAds.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DisableAds : SettingBase
|
||||
{
|
||||
private const string AdsKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Advertising ID for Relevant Ads";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "Windows 10 comes integrated with advertising. Microsoft assigns a unique identificator to track your activity in the Microsoft Store and on UWP apps to target you with relevant ads.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(AdsKey, "Enabled", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AdsKey, "Enabled", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AdsKey, "Enabled", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
55
src/Privatezilla/Settings/Privacy/DisableBiometrics.cs
vendored
Normal file
55
src/Privatezilla/Settings/Privacy/DisableBiometrics.cs
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DisableBiometrics : SettingBase
|
||||
{
|
||||
private const string BiometricsKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Biometrics";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Windows Hello Biometrics";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "Windows Hello biometrics lets you sign in to your devices, apps, online services, and networks using your face, iris, or fingerprint";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(BiometricsKey, "Enabled", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(BiometricsKey, "Enabled", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(BiometricsKey, "Enabled", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Privacy/DisableCEIP.cs
vendored
Normal file
54
src/Privatezilla/Settings/Privacy/DisableCEIP.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DisableCEIP : SettingBase
|
||||
{
|
||||
private const string CEIPKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\SQMClient\Windows";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Customer Experience Program";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "The Customer Experience Improvement Program (CEIP) is a feature that comes enabled by default on Windows 10, and it secretly collects and submits hardware and software usage information to Microsoft.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(CEIPKey, "CEIPEnable", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(CEIPKey, "CEIPEnable", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(CEIPKey, "CEIPEnable", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
58
src/Privatezilla/Settings/Privacy/DisableCompTelemetry.cs
vendored
Normal file
58
src/Privatezilla/Settings/Privacy/DisableCompTelemetry.cs
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DisableCompTelemetry : SettingBase
|
||||
{
|
||||
private const string TelemetryKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\CompatTelRunner.exe";
|
||||
private const string DesiredValue = @"%windir%\System32\taskkill.exe";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Compatibility Telemetry";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "This process is periodically collecting a variety of technical data about your computer and its performance and sending it to Microsoft for its Windows Customer Experience Improvement Program.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(TelemetryKey, "Debugger", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(TelemetryKey, "Debugger", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var RegKey = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\CompatTelRunner.exe", true);
|
||||
RegKey.DeleteValue("Debugger");
|
||||
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
60
src/Privatezilla/Settings/Privacy/DisableFeedback.cs
vendored
Normal file
60
src/Privatezilla/Settings/Privacy/DisableFeedback.cs
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DisableFeedback: SettingBase
|
||||
{
|
||||
private const string PeriodInNanoSeconds = @"HKEY_CURRENT_USER\Software\Microsoft\Siuf\Rules";
|
||||
private const string NumberOfSIUFInPeriod = @"HKEY_CURRENT_USER\Software\Microsoft\Siuf\Rules";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Do not show feedback notifications";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "Windows 10 may also pop up from time to time and ask for feedback.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(PeriodInNanoSeconds, "PeriodInNanoSeconds", DesiredValue) &&
|
||||
RegistryHelper.IntEquals(NumberOfSIUFInPeriod, "NumberOfSIUFInPeriod", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(PeriodInNanoSeconds, "PeriodInNanoSeconds", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(NumberOfSIUFInPeriod, "NumberOfSIUFInPeriod", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
var RegKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Siuf\Rules", true);
|
||||
RegKey.DeleteValue("NumberOfSIUFInPeriod");
|
||||
RegKey.DeleteValue("PeriodInNanoSeconds");
|
||||
return true;
|
||||
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Privacy/DisableHEIP.cs
vendored
Normal file
54
src/Privatezilla/Settings/Privacy/DisableHEIP.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DisableHEIP: SettingBase
|
||||
{
|
||||
private const string HEIPKey = @"HKEY_CURRENT_USER\Software\Microsoft\Assistance\Client\1.0\Settings";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Help Experience Program";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "The Help Experience Improvement Program (HEIP) collects and send to Microsoft information about how you use Windows Help. This might reveal what problems you are having with your computer.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(HEIPKey, "ImplicitFeedback", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(HEIPKey, "ImplicitFeedback", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(HEIPKey, "ImplicitFeedback", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
53
src/Privatezilla/Settings/Privacy/DisableLocation.cs
vendored
Normal file
53
src/Privatezilla/Settings/Privacy/DisableLocation.cs
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DisableLocation : SettingBase
|
||||
{
|
||||
private const string LocationKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location";
|
||||
private const string DesiredValue = @"Deny";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Location tracking";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "Wherever you go, Windows 10 knows you're there. When Location Tracking is turned on, Windows and its apps are allowed to detect the current location of your computer or device.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.StringEquals(LocationKey, "Value", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(LocationKey, "Value", DesiredValue, RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(LocationKey, "Value", "Allow", RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
55
src/Privatezilla/Settings/Privacy/DisableMSExperiments.cs
vendored
Normal file
55
src/Privatezilla/Settings/Privacy/DisableMSExperiments.cs
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DisableMSExperiments: SettingBase
|
||||
{
|
||||
private const string ExperimentationKey = @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\current\device\System";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Settings Experimentation";
|
||||
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "In certain builds of Windows 10, users could let Microsoft experiment with the system to study user preferences or device behavior. This allows Microsoft to “conduct experiments” with the settings on your PC and should be disabled with this setting.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(ExperimentationKey, "AllowExperimentation", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(ExperimentationKey, "AllowExperimentation", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(ExperimentationKey, "AllowExperimentation", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
62
src/Privatezilla/Settings/Privacy/DisableTelemetry.cs
vendored
Normal file
62
src/Privatezilla/Settings/Privacy/DisableTelemetry.cs
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DisableTelemetry : SettingBase
|
||||
{
|
||||
private const string TelemetryKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DataCollection";
|
||||
private const string DiagTrack = @"HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\DiagTrack";
|
||||
private const string dmwappushservice = @"HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\dmwappushservice";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Telemetry";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "This will prevent Windows from collecting usage information and setting diagnostic data to Basic, which is the lowest level available for all consumer versions of Windows 10.\nThe services diagtrack & dmwappushservice will also be disabled.\nNOTE: Diagnostic Data must be set to Full to get preview builds from Windows-Insider-Program! ";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(TelemetryKey, "AllowTelemetry", DesiredValue) &&
|
||||
RegistryHelper.IntEquals(DiagTrack, "Start", 4) &&
|
||||
RegistryHelper.IntEquals(dmwappushservice, "Start", 4)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(TelemetryKey, "AllowTelemetry", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(DiagTrack, "Start", 4, RegistryValueKind.DWord);
|
||||
Registry.SetValue(dmwappushservice, "Start", 4, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(TelemetryKey, "AllowTelemetry", 3, RegistryValueKind.DWord);
|
||||
Registry.SetValue(DiagTrack, "Start", 2, RegistryValueKind.DWord);
|
||||
Registry.SetValue(dmwappushservice, "Start", 2, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
60
src/Privatezilla/Settings/Privacy/DisableTimeline.cs
vendored
Normal file
60
src/Privatezilla/Settings/Privacy/DisableTimeline.cs
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DisableTimeline : SettingBase
|
||||
{
|
||||
private const string EnableActivityFeed = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\System";
|
||||
private const string PublishUserActivities = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\System";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Timeline feature";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "This collects a history of activities you've performed, including files you've opened and web pages you've viewed in Edge.\nIf Timeline isn’t for you, or you simply don’t want Windows 10 collecting your sensitive activities and information, you can disable Timeline completely with this setting.\nNote: A system reboot is required for the changes to take effect.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(EnableActivityFeed, "EnableActivityFeed", DesiredValue) &&
|
||||
RegistryHelper.IntEquals(PublishUserActivities, "PublishUserActivities", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(EnableActivityFeed, "EnableActivityFeed", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(PublishUserActivities, "PublishUserActivities", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
var RegKey = Registry.LocalMachine.OpenSubKey(@"Software\Policies\Microsoft\Windows\System", true);
|
||||
RegKey.DeleteValue("EnableActivityFeed");
|
||||
RegKey.DeleteValue("PublishUserActivities");
|
||||
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
67
src/Privatezilla/Settings/Privacy/DisableTips.cs
vendored
Normal file
67
src/Privatezilla/Settings/Privacy/DisableTips.cs
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DisableTips: SettingBase
|
||||
{
|
||||
private const string DisableSoftLanding = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CloudContent";
|
||||
private const string DisableWindowsSpotlightFeatures = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CloudContent";
|
||||
private const string DisableWindowsConsumerFeatures = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CloudContent";
|
||||
private const string DoNotShowFeedbackNotifications = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DataCollection";
|
||||
private const int DesiredValue = 1;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Windows Tips";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "You will no longer see Windows Tips, e.g. Spotlight and Consumer Features, Feedback Notifications etc.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(DisableSoftLanding, "DisableSoftLanding", DesiredValue) &&
|
||||
RegistryHelper.IntEquals(DisableWindowsSpotlightFeatures, "DisableWindowsSpotlightFeatures", DesiredValue) &&
|
||||
RegistryHelper.IntEquals(DisableWindowsConsumerFeatures, "DisableWindowsConsumerFeatures", DesiredValue) &&
|
||||
RegistryHelper.IntEquals(DoNotShowFeedbackNotifications, "DoNotShowFeedbackNotifications", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(DisableSoftLanding, "DisableSoftLanding", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(DisableWindowsSpotlightFeatures, "DisableWindowsSpotlightFeatures", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(DisableWindowsConsumerFeatures, "DisableWindowsConsumerFeatures", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(DoNotShowFeedbackNotifications, "DoNotShowFeedbackNotifications", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(DisableSoftLanding, "DisableSoftLanding", 0, RegistryValueKind.DWord);
|
||||
Registry.SetValue(DisableWindowsSpotlightFeatures, "DisableWindowsSpotlightFeatures", 0, RegistryValueKind.DWord);
|
||||
Registry.SetValue(DisableWindowsConsumerFeatures, "DisableWindowsConsumerFeatures", 0, RegistryValueKind.DWord);
|
||||
Registry.SetValue(DoNotShowFeedbackNotifications, "DoNotShowFeedbackNotifications", 0, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
64
src/Privatezilla/Settings/Privacy/DisableTipsLockScreen.cs
vendored
Normal file
64
src/Privatezilla/Settings/Privacy/DisableTipsLockScreen.cs
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DisableTipsLockScreen : SettingBase
|
||||
{
|
||||
private const string SpotlightKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager";
|
||||
private const string LockScreenKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager";
|
||||
private const string TipsTricksSuggestions = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Ads and Links on Lock Screen";
|
||||
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "This setting will set your lock screen background options to a picture and turn off tips, fun facts and tricks from Microsoft.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(SpotlightKey, "RotatingLockScreenEnabled", DesiredValue) &&
|
||||
RegistryHelper.IntEquals(LockScreenKey, "RotatingLockScreenOverlayEnabled", DesiredValue) &&
|
||||
RegistryHelper.IntEquals(TipsTricksSuggestions, "SubscribedContent-338389Enabled", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(SpotlightKey, "RotatingLockScreenEnabled", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(LockScreenKey, "RotatingLockScreenOverlayEnabled", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(TipsTricksSuggestions, "SubscribedContent-338389Enabled", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(SpotlightKey, "RotatingLockScreenEnabled", 1, RegistryValueKind.DWord);
|
||||
Registry.SetValue(LockScreenKey, "RotatingLockScreenOverlayEnabled", 1, RegistryValueKind.DWord);
|
||||
Registry.SetValue(TipsTricksSuggestions, "SubscribedContent-338389Enabled", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
55
src/Privatezilla/Settings/Privacy/DisableWiFi.cs
vendored
Normal file
55
src/Privatezilla/Settings/Privacy/DisableWiFi.cs
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class DisableWiFi : SettingBase
|
||||
{
|
||||
private const string WiFiKey = @"HKEY_LOCAL_MACHINE\Software\Microsoft\WcmSvc\wifinetworkmanager\config";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Wi-Fi Sense";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "You should at least stop your PC from sending your Wi-Fi password.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(WiFiKey, "AutoConnectAllowedOEM", DesiredValue)
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(WiFiKey, "AutoConnectAllowedOEM", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(WiFiKey, "AutoConnectAllowedOEM", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
55
src/Privatezilla/Settings/Privacy/GetMoreOutOfWindows.cs
vendored
Normal file
55
src/Privatezilla/Settings/Privacy/GetMoreOutOfWindows.cs
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class GetMoreOutOfWindows: SettingBase
|
||||
{
|
||||
private const string GetKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\UserProfileEngagement";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Get Even More Out of Windows";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "Recent Windows 10 versions occasionally display a nag screen \"Get Even More Out of Windows\" when you sign-in to your user account. If you find it annoying, you can disable it with this setting.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(GetKey, "ScoobeSystemSettingEnabled", DesiredValue)
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(GetKey, "ScoobeSystemSettingEnabled", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(GetKey, "ScoobeSystemSettingEnabled", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
71
src/Privatezilla/Settings/Privacy/HandwritingData.cs
vendored
Normal file
71
src/Privatezilla/Settings/Privacy/HandwritingData.cs
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class HandwritingData : SettingBase
|
||||
{
|
||||
private const string AllowInputPersonalization = @"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\InputPersonalization";
|
||||
private const string RestrictImplicitInkCollection = @"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\InputPersonalization";
|
||||
private const string RestrictImplicitTextCollection = @"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\InputPersonalization";
|
||||
private const string PreventHandwritingErrorReports = @"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\HandwritingErrorReports";
|
||||
private const string PreventHandwritingDataSharing = @"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\TabletPC";
|
||||
private const int DesiredValue = 1;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Prevent using handwriting data";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "If you don’t want Windows to know and record all unique words that you use, like names and professional jargon, just enable this setting.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(AllowInputPersonalization, "AllowInputPersonalization", 0) &&
|
||||
RegistryHelper.IntEquals(RestrictImplicitInkCollection, "RestrictImplicitInkCollection", DesiredValue) &&
|
||||
RegistryHelper.IntEquals(RestrictImplicitTextCollection, "RestrictImplicitTextCollection", DesiredValue) &&
|
||||
RegistryHelper.IntEquals(PreventHandwritingErrorReports, "PreventHandwritingErrorReports", DesiredValue) &&
|
||||
RegistryHelper.IntEquals(PreventHandwritingDataSharing, "PreventHandwritingDataSharing", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AllowInputPersonalization, "AllowInputPersonalization", 0, RegistryValueKind.DWord);
|
||||
Registry.SetValue(RestrictImplicitInkCollection, "RestrictImplicitInkCollection", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(RestrictImplicitTextCollection, "RestrictImplicitTextCollection", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(PreventHandwritingErrorReports, "PreventHandwritingErrorReports", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(PreventHandwritingDataSharing, "PreventHandwritingDataSharing", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(AllowInputPersonalization, "AllowInputPersonalization", 1, RegistryValueKind.DWord);
|
||||
Registry.SetValue(RestrictImplicitInkCollection, "RestrictImplicitInkCollection", 0, RegistryValueKind.DWord);
|
||||
Registry.SetValue(RestrictImplicitTextCollection, "RestrictImplicitTextCollection", 0, RegistryValueKind.DWord);
|
||||
Registry.SetValue(PreventHandwritingErrorReports, "PreventHandwritingErrorReports", 0, RegistryValueKind.DWord);
|
||||
Registry.SetValue(PreventHandwritingDataSharing, "PreventHandwritingDataSharing", 0, RegistryValueKind.DWord); ;
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
56
src/Privatezilla/Settings/Privacy/InstalledApps.cs
vendored
Normal file
56
src/Privatezilla/Settings/Privacy/InstalledApps.cs
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class InstalledApps : SettingBase
|
||||
{
|
||||
private const string InstalledKey = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Block automatic Installation of apps";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "When you sign-in to a new Windows 10 profile or device for the first time, chance is that you notice several third-party applications and games listed prominently in the Start menu.\nThis setting will block automatic Installation of suggested Windows 10 apps.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
|
||||
return !(
|
||||
RegistryHelper.IntEquals(InstalledKey, "SilentInstalledAppsEnabled", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(InstalledKey, "SilentInstalledAppsEnabled", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(InstalledKey, "SilentInstalledAppsEnabled", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
58
src/Privatezilla/Settings/Privacy/InventoryCollector.cs
vendored
Normal file
58
src/Privatezilla/Settings/Privacy/InventoryCollector.cs
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class InventoryCollector : SettingBase
|
||||
{
|
||||
private const string InventoryKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\AppCompat";
|
||||
private const string AppTelemetryKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\AppCompat";
|
||||
private const int DesiredValue = 1;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable Inventory Collector";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "The Inventory Collector inventories applications files devices and drivers on the system and sends the information to Microsoft. This information is used to help diagnose compatibility problems.\nNote: This setting setting has no effect if the Customer Experience Improvement Program is turned off. The Inventory Collector will be off.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(InventoryKey, "DisableInventory", DesiredValue) &&
|
||||
RegistryHelper.IntEquals(AppTelemetryKey, "AITEnable", 0)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(InventoryKey, "DisableInventory", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(AppTelemetryKey, "AITEnable", 0, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(InventoryKey, "DisableInventory", 0, RegistryValueKind.DWord);
|
||||
Registry.SetValue(AppTelemetryKey, "AITEnable", 1, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
54
src/Privatezilla/Settings/Privacy/SuggestedApps.cs
vendored
Normal file
54
src/Privatezilla/Settings/Privacy/SuggestedApps.cs
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class SuggestedApps : SettingBase
|
||||
{
|
||||
private const string SuggestedKey = @"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Block suggested apps in Start";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "This will block the Suggested Apps that occasionally appear on the Start menu.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(SuggestedKey, "SubscribedContent-338388Enabled", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(SuggestedKey, "SubscribedContent-338388Enabled", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(SuggestedKey, "SubscribedContent-338388Enabled", 1 , RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
64
src/Privatezilla/Settings/Privacy/SuggestedContent.cs
vendored
Normal file
64
src/Privatezilla/Settings/Privacy/SuggestedContent.cs
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Privacy
|
||||
{
|
||||
internal class SuggestedContent : SettingBase
|
||||
{
|
||||
private const string SubscribedContent338393 = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager";
|
||||
private const string SubscribedContent353694 = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager";
|
||||
private const string SubscribedContent353696 = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager";
|
||||
private const int DesiredValue = 0;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Block suggested content in Settings app";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "To help new Windows 10 users to learn new features of Windows 10, Microsoft has started showing suggested content via a huge banner in Windows 10 Setting Apps. ";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(SubscribedContent338393, "SubscribedContent-338393Enabled", DesiredValue) &&
|
||||
RegistryHelper.IntEquals(SubscribedContent353694, "SubscribedContent-353694Enabled", DesiredValue) &&
|
||||
RegistryHelper.IntEquals(SubscribedContent353696, "SubscribedContent-353696Enabled", DesiredValue)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(SubscribedContent338393, "SubscribedContent-338393Enabled", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(SubscribedContent353694, "SubscribedContent-353694Enabled", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(SubscribedContent353696, "SubscribedContent-353696Enabled", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(SubscribedContent338393, "SubscribedContent-338393Enabled", 1, RegistryValueKind.DWord);
|
||||
Registry.SetValue(SubscribedContent353694, "SubscribedContent-353694Enabled", 1, RegistryValueKind.DWord);
|
||||
Registry.SetValue(SubscribedContent353696, "SubscribedContent-353696Enabled", 1, RegistryValueKind.DWord);
|
||||
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
55
src/Privatezilla/Settings/Security/DisablePassword.cs
vendored
Normal file
55
src/Privatezilla/Settings/Security/DisablePassword.cs
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Security
|
||||
{
|
||||
internal class DisablePassword : SettingBase
|
||||
{
|
||||
private const string PasswordKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CredUI";
|
||||
private const int DesiredValue = 1;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable password reveal button";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "The password reveal button can be used to display an entered password and should be disabled with this setting.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(PasswordKey, "DisablePasswordReveal", DesiredValue)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(PasswordKey, "DisablePasswordReveal", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(PasswordKey, "DisablePasswordReveal", 0, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
55
src/Privatezilla/Settings/Security/WindowsDRM.cs
vendored
Normal file
55
src/Privatezilla/Settings/Security/WindowsDRM.cs
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Security
|
||||
{
|
||||
internal class WindowsDRM : SettingBase
|
||||
{
|
||||
private const string DRMKey = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\WMDRM";
|
||||
private const int DesiredValue = 1;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable DRM in Windows Media Player";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "If the Windows Media Digital Rights Management should not get access to the Internet (or intranet) for license acquisition and security upgrades, you can prevent it with this setting.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(DRMKey, "DisableOnline", DesiredValue)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(DRMKey, "DisableOnline", DesiredValue, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(DRMKey, "DisableOnline", 0, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
59
src/Privatezilla/Settings/Updates/BlockMajorUpdates.cs
vendored
Normal file
59
src/Privatezilla/Settings/Updates/BlockMajorUpdates.cs
vendored
Normal file
|
@ -0,0 +1,59 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Updates
|
||||
{
|
||||
internal class BlockMajorUpdates : SettingBase
|
||||
{
|
||||
private const string TargetReleaseVersion = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate";
|
||||
private const string TargetReleaseVersionInfo = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate";
|
||||
private const int DesiredValue = 1;
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Block major Windows updates";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "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).";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(TargetReleaseVersion, "TargetReleaseVersion", DesiredValue) &&
|
||||
RegistryHelper.StringEquals(TargetReleaseVersionInfo, "TargetReleaseVersionInfo", WindowsHelper.GetOS())
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(TargetReleaseVersion, "TargetReleaseVersion", DesiredValue, RegistryValueKind.DWord);
|
||||
Registry.SetValue(TargetReleaseVersionInfo, "TargetReleaseVersionInfo", WindowsHelper.GetOS(), RegistryValueKind.String);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
var RegKey = Registry.LocalMachine.OpenSubKey(@"Software\Policies\Microsoft\Windows\WindowsUpdate", true);
|
||||
RegKey.DeleteValue("TargetReleaseVersion");
|
||||
RegKey.DeleteValue("TargetReleaseVersionInfo");
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
68
src/Privatezilla/Settings/Updates/DisableUpdates.cs
vendored
Normal file
68
src/Privatezilla/Settings/Updates/DisableUpdates.cs
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
using Microsoft.Win32;
|
||||
|
||||
namespace Privatezilla.Setting.Updates
|
||||
{
|
||||
internal class DisableUpdates : SettingBase
|
||||
{
|
||||
private const string NoAutoUpdate = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU";
|
||||
private const string AUOptions = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU";
|
||||
private const string ScheduledInstallDay = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU";
|
||||
private const string ScheduledInstallTime = @"HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU";
|
||||
|
||||
public override string ID()
|
||||
{
|
||||
return "Disable forced Windows updates";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "This will notify when updates are available, and you decide when to install them.";
|
||||
}
|
||||
|
||||
public override bool CheckSetting()
|
||||
{
|
||||
return !(
|
||||
RegistryHelper.IntEquals(NoAutoUpdate, "NoAutoUpdate",0) &&
|
||||
RegistryHelper.IntEquals(AUOptions, "AUOptions", 2) &&
|
||||
RegistryHelper.IntEquals(ScheduledInstallDay, "ScheduledInstallDay", 0) &&
|
||||
RegistryHelper.IntEquals(ScheduledInstallTime, "ScheduledInstallTime", 3)
|
||||
);
|
||||
}
|
||||
|
||||
public override bool DoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(NoAutoUpdate, "NoAutoUpdate", 0, RegistryValueKind.DWord);
|
||||
Registry.SetValue(AUOptions, "AUOptions", 2, RegistryValueKind.DWord);
|
||||
Registry.SetValue(ScheduledInstallDay, "ScheduledInstallDay", 0, RegistryValueKind.DWord);
|
||||
Registry.SetValue(ScheduledInstallTime, "ScheduledInstallTime", 3, RegistryValueKind.DWord);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool UndoSetting()
|
||||
{
|
||||
try
|
||||
{
|
||||
Registry.SetValue(NoAutoUpdate, "NoAutoUpdate", 1, RegistryValueKind.DWord);
|
||||
|
||||
var RegKey = Registry.LocalMachine.OpenSubKey(@"Software\Policies\Microsoft\Windows\WindowsUpdate\AU", true);
|
||||
RegKey.DeleteValue("AUOptions");
|
||||
RegKey.DeleteValue("ScheduledInstallDay");
|
||||
RegKey.DeleteValue("ScheduledInstallTime");
|
||||
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
56
src/Privatezilla/Settings/Updates/UpdatesSharing.cs
vendored
Normal file
56
src/Privatezilla/Settings/Updates/UpdatesSharing.cs
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
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 "Disable Windows updates sharing";
|
||||
}
|
||||
|
||||
public override string Info()
|
||||
{
|
||||
return "Windows 10 lets you download updates from several sources to speed up the process of updating the operating system. This will disable sharing your files by others and exposing your IP address to random computers.";
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
73
src/Privatezilla/app.manifest
vendored
Normal file
73
src/Privatezilla/app.manifest
vendored
Normal file
|
@ -0,0 +1,73 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!-- UAC-Manifestoptionen
|
||||
Wenn Sie die Ebene der Benutzerkontensteuerung für Windows ändern möchten, ersetzen Sie den
|
||||
Knoten "requestedExecutionLevel" wie folgt.
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
Durch Angabe des Elements "requestedExecutionLevel" wird die Datei- und Registrierungsvirtualisierung deaktiviert.
|
||||
Entfernen Sie dieses Element, wenn diese Virtualisierung aus Gründen der Abwärtskompatibilität
|
||||
für die Anwendung erforderlich ist.
|
||||
-->
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Eine Liste der Windows-Versionen, unter denen diese Anwendung getestet
|
||||
und für die sie entwickelt wurde. Wenn Sie die Auskommentierung der entsprechenden Elemente aufheben,
|
||||
wird von Windows automatisch die kompatibelste Umgebung ausgewählt. -->
|
||||
|
||||
<!-- Windows Vista -->
|
||||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
||||
|
||||
<!-- Windows 7 -->
|
||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
|
||||
|
||||
<!-- Windows 8 -->
|
||||
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
|
||||
|
||||
<!-- Windows 8.1 -->
|
||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
||||
|
||||
<!-- Windows 10 -->
|
||||
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
||||
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
<!-- Gibt an, dass die Anwendung mit DPI-Werten kompatibel ist und von Windows nicht automatisch auf höhere
|
||||
DPI-Werte skaliert wird. WPF-Anwendungen (Windows Presentation Foundation) sind automatisch mit DPI-Werten kompatibel und müssen sich nicht
|
||||
anmelden. Für Windows Forms-Anwendungen für .NET Framework 4.6, die sich für diese Einstellung anmelden, muss
|
||||
auch die Einstellung "'EnableWindowsFormsHighDpiAutoResizing" in der "app.config" auf "true" festgelegt werden. -->
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
<!-- Designs für allgemeine Windows-Steuerelemente und -Dialogfelder (Windows XP und höher) aktivieren -->
|
||||
<!--
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
-->
|
||||
|
||||
</assembly>
|
BIN
src/Privatezilla/github.png
vendored
Normal file
BIN
src/Privatezilla/github.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 828 B |
BIN
src/Privatezilla/icon.ico
vendored
Normal file
BIN
src/Privatezilla/icon.ico
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 177 KiB |
Loading…
Add table
Reference in a new issue