Compare commits

...

7 Commits

Author SHA1 Message Date
8f851ef9fe things 2025-10-26 12:29:06 +01:00
e762247a2a Almost finalized 2025-10-24 19:10:40 +02:00
3493a61317 Things 2025-10-24 09:47:08 +02:00
d74f0ed94b Still working on upgrade feature 2025-10-23 17:58:07 +02:00
0cbd073d9e work with some things 2025-10-23 08:58:08 +02:00
c03146f094 Merge branch 'master' of https://github.com/theitaliandeveloper/Perfect11 2025-10-19 16:06:54 +02:00
71a925e002 new feature coming soon 2025-10-19 16:06:43 +02:00
23 changed files with 1067 additions and 39 deletions

View File

@@ -1,6 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup> </startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="lzo.net" publicKeyToken="7c3b11b873e0cbca" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-0.0.6.0" newVersion="0.0.6.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration> </configuration>

View File

@@ -30,13 +30,25 @@
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.theme = new ReaLTaiizor.Forms.FormTheme(); this.theme = new ReaLTaiizor.Forms.FormTheme();
this.githubLink = new ReaLTaiizor.Controls.PoisonLinkLabel();
this.controlBoxEdit1 = new ReaLTaiizor.Controls.ControlBoxEdit(); this.controlBoxEdit1 = new ReaLTaiizor.Controls.ControlBoxEdit();
this.pages = new ReaLTaiizor.Controls.PoisonTabControl(); this.pages = new ReaLTaiizor.Controls.PoisonTabControl();
this.welcomePage = new ReaLTaiizor.Controls.PoisonTabPage(); this.welcomePage = new ReaLTaiizor.Controls.PoisonTabPage();
this.editionLabel = new ReaLTaiizor.Controls.PoisonLabel();
this.poisonLabel2 = new ReaLTaiizor.Controls.PoisonLabel(); this.poisonLabel2 = new ReaLTaiizor.Controls.PoisonLabel();
this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.poisonLabel1 = new ReaLTaiizor.Controls.PoisonLabel(); this.poisonLabel1 = new ReaLTaiizor.Controls.PoisonLabel();
this.upgradePage = new ReaLTaiizor.Controls.PoisonTabPage();
this.statusLabel = new ReaLTaiizor.Controls.PoisonLabel();
this.installProgress = new ReaLTaiizor.Controls.PoisonProgressBar();
this.poisonLabel6 = new ReaLTaiizor.Controls.PoisonLabel();
this.poisonLabel7 = new ReaLTaiizor.Controls.PoisonLabel();
this.upgradeButton = new ReaLTaiizor.Controls.PoisonButton();
this.automateOOBECheck = new ReaLTaiizor.Controls.PoisonCheckBox();
this.bypassWin11RequirementsCheck = new ReaLTaiizor.Controls.PoisonCheckBox();
this.poisonLabel5 = new ReaLTaiizor.Controls.PoisonLabel();
this.upgradeMethod = new ReaLTaiizor.Controls.PoisonComboBox();
this.poisonLabel3 = new ReaLTaiizor.Controls.PoisonLabel();
this.poisonLabel4 = new ReaLTaiizor.Controls.PoisonLabel();
this.debloatPage = new ReaLTaiizor.Controls.PoisonTabPage(); this.debloatPage = new ReaLTaiizor.Controls.PoisonTabPage();
this.BtnRunUninstaller = new ReaLTaiizor.Controls.PoisonButton(); this.BtnRunUninstaller = new ReaLTaiizor.Controls.PoisonButton();
this.LblRemoveCount = new ReaLTaiizor.Controls.PoisonLabel(); this.LblRemoveCount = new ReaLTaiizor.Controls.PoisonLabel();
@@ -51,11 +63,12 @@
this.tweaksPage = new ReaLTaiizor.Controls.PoisonTabPage(); this.tweaksPage = new ReaLTaiizor.Controls.PoisonTabPage();
this.runTweaks = new ReaLTaiizor.Controls.PoisonButton(); this.runTweaks = new ReaLTaiizor.Controls.PoisonButton();
this.tweaksList = new ReaLTaiizor.Controls.PoisonListView(); this.tweaksList = new ReaLTaiizor.Controls.PoisonListView();
this.githubLink = new ReaLTaiizor.Controls.PoisonLinkLabel(); this.editionLabel = new ReaLTaiizor.Controls.PoisonLabel();
this.theme.SuspendLayout(); this.theme.SuspendLayout();
this.pages.SuspendLayout(); this.pages.SuspendLayout();
this.welcomePage.SuspendLayout(); this.welcomePage.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.upgradePage.SuspendLayout();
this.debloatPage.SuspendLayout(); this.debloatPage.SuspendLayout();
this.tweaksPage.SuspendLayout(); this.tweaksPage.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
@@ -80,6 +93,21 @@
this.theme.TabIndex = 0; this.theme.TabIndex = 0;
this.theme.Text = "Perfect11"; this.theme.Text = "Perfect11";
// //
// githubLink
//
this.githubLink.BackColor = System.Drawing.Color.Transparent;
this.githubLink.Cursor = System.Windows.Forms.Cursors.Hand;
this.githubLink.Location = new System.Drawing.Point(1275, 762);
this.githubLink.Name = "githubLink";
this.githubLink.Size = new System.Drawing.Size(48, 26);
this.githubLink.TabIndex = 5;
this.githubLink.Text = "GitHub";
this.githubLink.UseCustomBackColor = true;
this.githubLink.UseCustomForeColor = true;
this.githubLink.UseSelectable = true;
this.githubLink.UseStyleColors = true;
this.githubLink.Click += new System.EventHandler(this.githubLink_Click);
//
// controlBoxEdit1 // controlBoxEdit1
// //
this.controlBoxEdit1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.controlBoxEdit1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -95,15 +123,17 @@
// pages // pages
// //
this.pages.Controls.Add(this.welcomePage); this.pages.Controls.Add(this.welcomePage);
this.pages.Controls.Add(this.upgradePage);
this.pages.Controls.Add(this.debloatPage); this.pages.Controls.Add(this.debloatPage);
this.pages.Controls.Add(this.tweaksPage); this.pages.Controls.Add(this.tweaksPage);
this.pages.Dock = System.Windows.Forms.DockStyle.Fill; this.pages.Dock = System.Windows.Forms.DockStyle.Fill;
this.pages.Location = new System.Drawing.Point(3, 28); this.pages.Location = new System.Drawing.Point(3, 28);
this.pages.Name = "pages"; this.pages.Name = "pages";
this.pages.SelectedIndex = 0; this.pages.SelectedIndex = 1;
this.pages.Size = new System.Drawing.Size(1323, 732); this.pages.Size = new System.Drawing.Size(1323, 732);
this.pages.TabIndex = 1; this.pages.TabIndex = 1;
this.pages.UseSelectable = true; this.pages.UseSelectable = true;
this.pages.SelectedIndexChanged += new System.EventHandler(this.pages_SelectedIndexChanged);
// //
// welcomePage // welcomePage
// //
@@ -124,17 +154,6 @@
this.welcomePage.VerticalScrollbarHighlightOnWheel = false; this.welcomePage.VerticalScrollbarHighlightOnWheel = false;
this.welcomePage.VerticalScrollbarSize = 51; this.welcomePage.VerticalScrollbarSize = 51;
// //
// editionLabel
//
this.editionLabel.AutoSize = true;
this.editionLabel.BackColor = System.Drawing.Color.Transparent;
this.editionLabel.Location = new System.Drawing.Point(12, 763);
this.editionLabel.Name = "editionLabel";
this.editionLabel.Size = new System.Drawing.Size(175, 19);
this.editionLabel.TabIndex = 4;
this.editionLabel.Text = "Perfect11 Community Edition";
this.editionLabel.UseCustomBackColor = true;
//
// poisonLabel2 // poisonLabel2
// //
this.poisonLabel2.AutoSize = true; this.poisonLabel2.AutoSize = true;
@@ -171,6 +190,164 @@
this.poisonLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.poisonLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.poisonLabel1.UseCustomBackColor = true; this.poisonLabel1.UseCustomBackColor = true;
// //
// upgradePage
//
this.upgradePage.Controls.Add(this.statusLabel);
this.upgradePage.Controls.Add(this.installProgress);
this.upgradePage.Controls.Add(this.poisonLabel6);
this.upgradePage.Controls.Add(this.poisonLabel7);
this.upgradePage.Controls.Add(this.upgradeButton);
this.upgradePage.Controls.Add(this.automateOOBECheck);
this.upgradePage.Controls.Add(this.bypassWin11RequirementsCheck);
this.upgradePage.Controls.Add(this.poisonLabel5);
this.upgradePage.Controls.Add(this.upgradeMethod);
this.upgradePage.Controls.Add(this.poisonLabel3);
this.upgradePage.Controls.Add(this.poisonLabel4);
this.upgradePage.HorizontalScrollbarBarColor = true;
this.upgradePage.HorizontalScrollbarHighlightOnWheel = false;
this.upgradePage.HorizontalScrollbarSize = 10;
this.upgradePage.Location = new System.Drawing.Point(4, 38);
this.upgradePage.Name = "upgradePage";
this.upgradePage.Size = new System.Drawing.Size(1315, 690);
this.upgradePage.TabIndex = 3;
this.upgradePage.Text = "Upgrade";
this.upgradePage.VerticalScrollbarBarColor = true;
this.upgradePage.VerticalScrollbarHighlightOnWheel = false;
this.upgradePage.VerticalScrollbarSize = 10;
//
// statusLabel
//
this.statusLabel.AutoSize = true;
this.statusLabel.BackColor = System.Drawing.Color.Transparent;
this.statusLabel.Location = new System.Drawing.Point(516, 638);
this.statusLabel.Name = "statusLabel";
this.statusLabel.Size = new System.Drawing.Size(48, 19);
this.statusLabel.TabIndex = 14;
this.statusLabel.Text = "$status";
this.statusLabel.UseCustomBackColor = true;
//
// installProgress
//
this.installProgress.Location = new System.Drawing.Point(5, 660);
this.installProgress.Name = "installProgress";
this.installProgress.Size = new System.Drawing.Size(1045, 27);
this.installProgress.TabIndex = 13;
//
// poisonLabel6
//
this.poisonLabel6.AutoSize = true;
this.poisonLabel6.BackColor = System.Drawing.Color.Transparent;
this.poisonLabel6.Location = new System.Drawing.Point(5, 247);
this.poisonLabel6.Name = "poisonLabel6";
this.poisonLabel6.Size = new System.Drawing.Size(436, 114);
this.poisonLabel6.TabIndex = 12;
this.poisonLabel6.Text = resources.GetString("poisonLabel6.Text");
this.poisonLabel6.UseCustomBackColor = true;
//
// poisonLabel7
//
this.poisonLabel7.AutoSize = true;
this.poisonLabel7.BackColor = System.Drawing.Color.Transparent;
this.poisonLabel7.FontSize = ReaLTaiizor.Extension.Poison.PoisonLabelSize.Tall;
this.poisonLabel7.Location = new System.Drawing.Point(5, 210);
this.poisonLabel7.Name = "poisonLabel7";
this.poisonLabel7.Size = new System.Drawing.Size(218, 25);
this.poisonLabel7.TabIndex = 11;
this.poisonLabel7.Text = "Reasons to get Windows 11:";
this.poisonLabel7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.poisonLabel7.UseCustomBackColor = true;
//
// upgradeButton
//
this.upgradeButton.Enabled = false;
this.upgradeButton.FontSize = ReaLTaiizor.Extension.Poison.PoisonButtonSize.Medium;
this.upgradeButton.Location = new System.Drawing.Point(1198, 645);
this.upgradeButton.Name = "upgradeButton";
this.upgradeButton.Size = new System.Drawing.Size(112, 42);
this.upgradeButton.TabIndex = 10;
this.upgradeButton.Text = "Install";
this.upgradeButton.UseSelectable = true;
this.upgradeButton.Click += new System.EventHandler(this.upgradeButton_Click);
//
// automateOOBECheck
//
this.automateOOBECheck.AutoSize = true;
this.automateOOBECheck.Enabled = false;
this.automateOOBECheck.Location = new System.Drawing.Point(5, 164);
this.automateOOBECheck.Name = "automateOOBECheck";
this.automateOOBECheck.Size = new System.Drawing.Size(353, 15);
this.automateOOBECheck.TabIndex = 9;
this.automateOOBECheck.Text = "Automate OOBE (skips parts of the OOBE, useful if reinstalling)";
this.automateOOBECheck.UseSelectable = true;
//
// bypassWin11RequirementsCheck
//
this.bypassWin11RequirementsCheck.AutoSize = true;
this.bypassWin11RequirementsCheck.Checked = true;
this.bypassWin11RequirementsCheck.CheckState = System.Windows.Forms.CheckState.Checked;
this.bypassWin11RequirementsCheck.Enabled = false;
this.bypassWin11RequirementsCheck.Location = new System.Drawing.Point(5, 131);
this.bypassWin11RequirementsCheck.Name = "bypassWin11RequirementsCheck";
this.bypassWin11RequirementsCheck.Size = new System.Drawing.Size(418, 15);
this.bypassWin11RequirementsCheck.TabIndex = 8;
this.bypassWin11RequirementsCheck.Text = "Bypass Windows 11 requirements (including RAM, CPU, TPM, Secure Boot)";
this.bypassWin11RequirementsCheck.UseSelectable = true;
//
// poisonLabel5
//
this.poisonLabel5.AutoSize = true;
this.poisonLabel5.BackColor = System.Drawing.Color.Transparent;
this.poisonLabel5.Location = new System.Drawing.Point(5, 87);
this.poisonLabel5.Name = "poisonLabel5";
this.poisonLabel5.Size = new System.Drawing.Size(114, 19);
this.poisonLabel5.TabIndex = 7;
this.poisonLabel5.Text = "Upgrade method:";
this.poisonLabel5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.poisonLabel5.UseCustomBackColor = true;
//
// upgradeMethod
//
this.upgradeMethod.FormattingEnabled = true;
this.upgradeMethod.ItemHeight = 23;
this.upgradeMethod.Items.AddRange(new object[] {
"Upgrade to Windows 11 (recommended, all languages)",
"Install Windows 11 IoT Enterprise LTSC (English US only)",
"Install Mini11 LTS (English UK only)",
"Use a custom image (for advanced users)"});
this.upgradeMethod.Location = new System.Drawing.Point(143, 87);
this.upgradeMethod.Name = "upgradeMethod";
this.upgradeMethod.PromptText = "--Please select--";
this.upgradeMethod.Size = new System.Drawing.Size(1067, 29);
this.upgradeMethod.TabIndex = 6;
this.upgradeMethod.UseSelectable = true;
this.upgradeMethod.SelectedIndexChanged += new System.EventHandler(this.poisonComboBox1_SelectedIndexChanged);
//
// poisonLabel3
//
this.poisonLabel3.AutoSize = true;
this.poisonLabel3.BackColor = System.Drawing.Color.Transparent;
this.poisonLabel3.Location = new System.Drawing.Point(5, 54);
this.poisonLabel3.Name = "poisonLabel3";
this.poisonLabel3.Size = new System.Drawing.Size(760, 19);
this.poisonLabel3.TabIndex = 5;
this.poisonLabel3.Text = "In this page, we\'ll get you on Windows 11 as Windows 10 is now end of life. This " +
"process can take some time, so please be patient!";
this.poisonLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.poisonLabel3.UseCustomBackColor = true;
//
// poisonLabel4
//
this.poisonLabel4.AutoSize = true;
this.poisonLabel4.BackColor = System.Drawing.Color.Transparent;
this.poisonLabel4.FontSize = ReaLTaiizor.Extension.Poison.PoisonLabelSize.Tall;
this.poisonLabel4.Location = new System.Drawing.Point(5, 17);
this.poisonLabel4.Name = "poisonLabel4";
this.poisonLabel4.Size = new System.Drawing.Size(227, 25);
this.poisonLabel4.TabIndex = 4;
this.poisonLabel4.Text = "Let\'s get you on Windows 11!";
this.poisonLabel4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.poisonLabel4.UseCustomBackColor = true;
//
// debloatPage // debloatPage
// //
this.debloatPage.Controls.Add(this.BtnRunUninstaller); this.debloatPage.Controls.Add(this.BtnRunUninstaller);
@@ -360,20 +537,16 @@
this.tweaksList.UseStyleColors = true; this.tweaksList.UseStyleColors = true;
this.tweaksList.Resize += new System.EventHandler(this.tweaksList_Resize); this.tweaksList.Resize += new System.EventHandler(this.tweaksList_Resize);
// //
// githubLink // editionLabel
// //
this.githubLink.BackColor = System.Drawing.Color.Transparent; this.editionLabel.AutoSize = true;
this.githubLink.Cursor = System.Windows.Forms.Cursors.Hand; this.editionLabel.BackColor = System.Drawing.Color.Transparent;
this.githubLink.Location = new System.Drawing.Point(1275, 762); this.editionLabel.Location = new System.Drawing.Point(12, 763);
this.githubLink.Name = "githubLink"; this.editionLabel.Name = "editionLabel";
this.githubLink.Size = new System.Drawing.Size(48, 26); this.editionLabel.Size = new System.Drawing.Size(175, 19);
this.githubLink.TabIndex = 5; this.editionLabel.TabIndex = 4;
this.githubLink.Text = "GitHub"; this.editionLabel.Text = "Perfect11 Community Edition";
this.githubLink.UseCustomBackColor = true; this.editionLabel.UseCustomBackColor = true;
this.githubLink.UseCustomForeColor = true;
this.githubLink.UseSelectable = true;
this.githubLink.UseStyleColors = true;
this.githubLink.Click += new System.EventHandler(this.githubLink_Click);
// //
// Form1 // Form1
// //
@@ -390,6 +563,7 @@
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Perfect11"; this.Text = "Perfect11";
this.TransparencyKey = System.Drawing.Color.Fuchsia; this.TransparencyKey = System.Drawing.Color.Fuchsia;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
this.Load += new System.EventHandler(this.Form1_Load); this.Load += new System.EventHandler(this.Form1_Load);
this.theme.ResumeLayout(false); this.theme.ResumeLayout(false);
this.theme.PerformLayout(); this.theme.PerformLayout();
@@ -397,6 +571,8 @@
this.welcomePage.ResumeLayout(false); this.welcomePage.ResumeLayout(false);
this.welcomePage.PerformLayout(); this.welcomePage.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.upgradePage.ResumeLayout(false);
this.upgradePage.PerformLayout();
this.debloatPage.ResumeLayout(false); this.debloatPage.ResumeLayout(false);
this.debloatPage.PerformLayout(); this.debloatPage.PerformLayout();
this.tweaksPage.ResumeLayout(false); this.tweaksPage.ResumeLayout(false);
@@ -429,6 +605,18 @@
private ReaLTaiizor.Controls.PoisonButton runTweaks; private ReaLTaiizor.Controls.PoisonButton runTweaks;
private ReaLTaiizor.Controls.PoisonLabel editionLabel; private ReaLTaiizor.Controls.PoisonLabel editionLabel;
private ReaLTaiizor.Controls.PoisonLinkLabel githubLink; private ReaLTaiizor.Controls.PoisonLinkLabel githubLink;
private ReaLTaiizor.Controls.PoisonTabPage upgradePage;
private ReaLTaiizor.Controls.PoisonLabel poisonLabel3;
private ReaLTaiizor.Controls.PoisonLabel poisonLabel4;
private ReaLTaiizor.Controls.PoisonLabel poisonLabel5;
private ReaLTaiizor.Controls.PoisonComboBox upgradeMethod;
private ReaLTaiizor.Controls.PoisonCheckBox bypassWin11RequirementsCheck;
private ReaLTaiizor.Controls.PoisonCheckBox automateOOBECheck;
private ReaLTaiizor.Controls.PoisonLabel poisonLabel6;
private ReaLTaiizor.Controls.PoisonLabel poisonLabel7;
private ReaLTaiizor.Controls.PoisonButton upgradeButton;
private ReaLTaiizor.Controls.PoisonLabel statusLabel;
private ReaLTaiizor.Controls.PoisonProgressBar installProgress;
} }
} }

View File

@@ -9,9 +9,12 @@ using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net.Http;
using System.Reflection;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace Perfect11 namespace Perfect11
{ {
@@ -19,6 +22,10 @@ namespace Perfect11
{ {
private List<string> _listSystemApps = new List<string>(); private List<string> _listSystemApps = new List<string>();
private List<IPlugin> _tweaks = new List<IPlugin>(); private List<IPlugin> _tweaks = new List<IPlugin>();
private CancellationTokenSource _cts;
private bool _isDownloading = false;
string url = $"https://software-static.download.prss.microsoft.com/dbazure/888969d5-f34g-4e03-ac9d-1f9786c66749/26200.6584.250915-1905.25h2_ge_release_svc_refresh_CLIENT_CONSUMER_x64FRE_{Utilities.GetLanguageCode()}.iso";
string destination = Path.Combine(@"C:\Temp", @"windows.iso");
private static string AppEdition = "Perfect11 Community Edition"; private static string AppEdition = "Perfect11 Community Edition";
public Form1() public Form1()
{ {
@@ -36,7 +43,9 @@ namespace Perfect11
welcomePage.Theme = ThemeStyle.Dark; welcomePage.Theme = ThemeStyle.Dark;
debloatPage.Theme = ThemeStyle.Dark; debloatPage.Theme = ThemeStyle.Dark;
poisonLabel1.Theme = ThemeStyle.Dark; poisonLabel1.Theme = ThemeStyle.Dark;
poisonLabel1.ForeColor = Color.FromArgb(255,255,255);
poisonLabel2.Theme = ThemeStyle.Dark; poisonLabel2.Theme = ThemeStyle.Dark;
poisonLabel2.ForeColor = Color.FromArgb(255, 255, 255);
LblInstalledCount.Theme = ThemeStyle.Dark; LblInstalledCount.Theme = ThemeStyle.Dark;
LblRemoveCount.Theme = ThemeStyle.Dark; LblRemoveCount.Theme = ThemeStyle.Dark;
LstUWP.Theme = ThemeStyle.Dark; LstUWP.Theme = ThemeStyle.Dark;
@@ -55,9 +64,19 @@ namespace Perfect11
LstUWP.BackColor = Color.FromArgb(17, 17, 17); LstUWP.BackColor = Color.FromArgb(17, 17, 17);
LstUWPRemove.BackColor = Color.FromArgb(17, 17, 17); LstUWPRemove.BackColor = Color.FromArgb(17, 17, 17);
tweaksList.BackColor = Color.FromArgb(17, 17, 17); tweaksList.BackColor = Color.FromArgb(17, 17, 17);
poisonLabel1.ForeColor = Color.FromArgb(255, 255, 255);
poisonLabel2.ForeColor = Color.FromArgb(255, 255, 255);
githubLink.Theme = ThemeStyle.Dark; githubLink.Theme = ThemeStyle.Dark;
upgradePage.Theme = ThemeStyle.Dark;
poisonLabel3.Theme = ThemeStyle.Dark;
poisonLabel4.Theme = ThemeStyle.Dark;
poisonLabel5.Theme = ThemeStyle.Dark;
upgradeMethod.Theme = ThemeStyle.Dark;
bypassWin11RequirementsCheck.Theme = ThemeStyle.Dark;
automateOOBECheck.Theme = ThemeStyle.Dark;
poisonLabel6.Theme = ThemeStyle.Dark;
poisonLabel7.Theme = ThemeStyle.Dark;
upgradeButton.Theme = ThemeStyle.Dark;
statusLabel.Theme = ThemeStyle.Dark;
installProgress.Theme = ThemeStyle.Dark;
} }
else else
{ {
@@ -85,6 +104,18 @@ namespace Perfect11
LstUWPRemove.BackColor = Color.FromArgb(255,255,255); LstUWPRemove.BackColor = Color.FromArgb(255,255,255);
tweaksList.BackColor = Color.FromArgb(255,255,255); tweaksList.BackColor = Color.FromArgb(255,255,255);
githubLink.Theme = ThemeStyle.Light; githubLink.Theme = ThemeStyle.Light;
upgradePage.Theme = ThemeStyle.Light;
poisonLabel3.Theme = ThemeStyle.Light;
poisonLabel4.Theme = ThemeStyle.Light;
poisonLabel5.Theme = ThemeStyle.Light;
upgradeMethod.Theme = ThemeStyle.Light;
bypassWin11RequirementsCheck.Theme = ThemeStyle.Light;
automateOOBECheck.Theme = ThemeStyle.Light;
poisonLabel6.Theme = ThemeStyle.Light;
poisonLabel7.Theme = ThemeStyle.Light;
upgradeButton.Theme = ThemeStyle.Light;
statusLabel.Theme = ThemeStyle.Light;
installProgress.Theme = ThemeStyle.Light;
} }
} }
private void Form1_Load(object sender, EventArgs e) private void Form1_Load(object sender, EventArgs e)
@@ -102,6 +133,8 @@ namespace Perfect11
int totalWidth2 = LstUWPRemove.ClientSize.Width; int totalWidth2 = LstUWPRemove.ClientSize.Width;
LstUWP.Columns[0].Width = totalWidth1; LstUWP.Columns[0].Width = totalWidth1;
LstUWPRemove.Columns[0].Width = totalWidth2; LstUWPRemove.Columns[0].Width = totalWidth2;
statusLabel.Visible = false;
installProgress.Visible = false;
} }
private void GetUWP() private void GetUWP()
{ {
@@ -405,5 +438,328 @@ namespace Perfect11
MessageBox.Show("Looks like your browser is not available, please copy the link below and paste it in your browser's address bar:\n\nhttps://github.com/theitaliandeveloper/Perfect11/","Perfect11",MessageBoxButtons.OK,MessageBoxIcon.Information); MessageBox.Show("Looks like your browser is not available, please copy the link below and paste it in your browser's address bar:\n\nhttps://github.com/theitaliandeveloper/Perfect11/","Perfect11",MessageBoxButtons.OK,MessageBoxIcon.Information);
} }
} }
private void pages_SelectedIndexChanged(object sender, EventArgs e)
{
#if !DEBUG // For UI Testing do not prevent using pages if not 11
if (pages.SelectedTab != upgradePage && _cts != null)
{
MessageBox.Show("Upgrade to Windows 11 is in progress, cannot change tab.", "Perfect11", MessageBoxButtons.OK, MessageBoxIcon.Information);
pages.SelectedTab = upgradePage;
}
if ((pages.SelectedTab == debloatPage || pages.SelectedTab == tweaksPage) && !Utilities.IsWindows11())
{
MessageBox.Show("In order to use these features you need to upgrade to Windows 11.","Perfect11",MessageBoxButtons.OK,MessageBoxIcon.Information);
pages.SelectedTab = upgradePage;
}
else if (pages.SelectedTab == upgradePage && Utilities.IsWindows11())
{
if (MessageBox.Show("You're already using Windows 11, there's no need to upgrade. However, this page might be useful as well for reinstallation. Are you sure to continue?", "Perfect11", MessageBoxButtons.YesNo, MessageBoxIcon.Information,MessageBoxDefaultButton.Button2) == DialogResult.No)
{
pages.SelectedTab = welcomePage;
}
}
#endif
}
private void poisonComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
statusLabel.Text = "Ready.";
installProgress.Value = 0;
upgradeButton.Enabled = true;
statusLabel.Visible = true;
installProgress.Visible = true;
if (upgradeMethod.SelectedIndex == 3)
{
OpenFileDialog ofd = new OpenFileDialog
{
Filter = "Disc Image File|*.iso",
Title = "Select custom ISO",
Multiselect = false
};
if (ofd.ShowDialog() == DialogResult.OK)
{
foreach (string fileName in ofd.FileNames)
{
destination = fileName;
}
}
else
{
upgradeMethod.SelectedIndex = 0;
}
}
if (upgradeMethod.SelectedIndex == 3 || upgradeMethod.SelectedIndex == 2) // Both Mini11 and custom ISO
{
automateOOBECheck.Enabled = false;
automateOOBECheck.Checked = false;
bypassWin11RequirementsCheck.Enabled = false;
bypassWin11RequirementsCheck.Checked = false;
}
if (upgradeMethod.SelectedIndex != 0 && upgradeMethod.SelectedIndex != 1) // if not normal installation
{
bypassWin11RequirementsCheck.Enabled = false;
bypassWin11RequirementsCheck.Checked = false;
}
else
{
automateOOBECheck.Enabled = true;
bypassWin11RequirementsCheck.Enabled = true;
bypassWin11RequirementsCheck.Checked = true;
}
}
private async void upgradeButton_Click(object sender, EventArgs e)
{
if (upgradeMethod.SelectedIndex == 1)
{
url = "https://oemsoc.download.prss.microsoft.com/dbazure/X23-81951_26100.1742.240906-0331.ge_release_svc_refresh_CLIENT_ENTERPRISES_OEM_x64FRE_en-us.iso_640de540-87c4-427f-be87-e6d53a3a60b4?t=2c3b664b-b119-4088-9db1-ccff72c6d22e&P1=102816950270&P2=601&P3=2&P4=OC448onxqdmdUsBUApAiE8pj1FZ%2bEPTU3%2bC6Quq29MVwMyyDUtR%2fsbiy7RdVoZOHaZRndvzeOOnIwJZ2x3%2bmP6YK9cjJSP41Lvs0SulF4SVyL5C0DdDmiWqh2QW%2bcDPj2Xp%2bMrI9NOeElSBS5kkOWP8Eiyf2VkkQFM3g5vIk3HJVvu5sWo6pFKpFv4lML%2bHaIiTSuwbPMs5xwEQTfScuTKfigNlUZPdHRMp1B3uKLgIA3r0IbRpZgHYMXEwXQ%2fSLMdDNQthpqQvz1PThVkx7ObD55CXgt0GNSAWRfjdURWb8ywWk1gT7ozAgpP%2fKNm56U5nh33WZSuMZIuO1SBM2vw%3d%3d";
}
else if (upgradeMethod.SelectedIndex == 2)
{
url = "https://archive.org/download/mini11-24h2/Mini11%20LTS%2024H2%20AIO%20v1%20Triton.iso";
}
// Se stiamo già scaricando → annulla
if (_isDownloading)
{
if (_cts != null && !_cts.IsCancellationRequested)
{
_cts.Cancel();
statusLabel.Text = "Canceling...";
upgradeButton.Enabled = false;
}
return;
}
try
{
upgradeMethod.Enabled = false;
bypassWin11RequirementsCheck.Enabled = false;
automateOOBECheck.Enabled = false;
string setupArguments = "";
installProgress.Value = 0;
upgradeButton.Text = "Cancel";
_isDownloading = true;
_cts = new CancellationTokenSource();
if (!Directory.Exists("C:\\Temp"))
Directory.CreateDirectory("C:\\Temp");
if (Directory.Exists("C:\\Temp\\Perfect11_W11_TMP"))
Directory.Delete("C:\\Temp\\Perfect11_W11_TMP",true);
if (File.Exists("C:\\Temp\\windows.iso"))
File.Delete("C:\\Temp\\windows.iso");
if (upgradeMethod.SelectedIndex != 3)
{
destination = Path.Combine(@"C:\Temp", @"windows.iso");
statusLabel.Text = "Downloading ISO...";
await DownloadFileAsync(url, destination, _cts.Token);
statusLabel.Text = "Download completed!";
}
Thread.Sleep(1000);
statusLabel.Text = "Extracting...";
await Task.Run(() => ExtractIsoWithProgress(destination, @"C:\Temp\Perfect11_W11_TMP", _cts.Token));
statusLabel.Text = "Extraction complete!";
#if !DEBUG
if (File.Exists(destination) && upgradeMethod.SelectedIndex != 3)
File.Delete(destination);
#endif
if (!File.Exists(@"C:\Temp\Perfect11_W11_TMP\sources\EI.cfg"))
{
File.WriteAllText(@"C:\Temp\Perfect11_W11_TMP\sources\EI.CFG",Resources.EI_CFG);
}
Thread.Sleep(1000);
if (automateOOBECheck.Checked)
{
statusLabel.Text = "Applying OOBE automation tweak...";
if (File.Exists(@"C:\Temp\Perfect11_W11_TMP\autounattend.xml"))
{
File.Delete(@"C:\Temp\Perfect11_W11_TMP\autounattend.xml");
}
File.WriteAllText(@"C:\Temp\Perfect11_W11_TMP\autounattend.xml",Resources.unattend_OOBEAutomate);
}
statusLabel.Text = "Running Windows 11 Setup...";
if (bypassWin11RequirementsCheck.Checked)
{
setupArguments += "/Product Server";
}
if (upgradeMethod.SelectedIndex == 1)
{
setupArguments += "/pkey KBN8V-HFGQ4-MGXVD-347P6-PDQGT";
}
setupArguments += " /Compat IgnoreWarning /Telemetry disable /eula accept";
if (upgradeMethod.SelectedIndex == 2)
{
setupArguments += " /dynamicupdate disable";
}
else
{
setupArguments += " /dynamicupdate enable";
}
ProcessStartInfo info = new ProcessStartInfo
{
FileName = @"C:\Temp\Perfect11_W11_TMP\sources\setupprep.exe",
Arguments = setupArguments
};
Process.Start(info);
_cts = null;
MessageBox.Show("Almost done! Now follow the prompts to continue the Windows 11 installation! Perfect11 will now close.","Perfect11",MessageBoxButtons.OK,MessageBoxIcon.Information);
Application.Exit();
}
catch (OperationCanceledException)
{
statusLabel.Text = "Installation aborted!";
try
{
#if !DEBUG
if (File.Exists(destination) && upgradeMethod.SelectedIndex != 3)
File.Delete(destination);
if (Directory.Exists(Path.Combine(@"C:\Temp", "Perfect11_W11_TMP")))
Directory.Delete(Path.Combine(@"C:\Temp", "Perfect11_W11_TMP"), true);
#endif
}
catch { }
}
catch (Exception ex)
{
statusLabel.Text = "Error: " + ex.Message;
try
{
#if !DEBUG
if (File.Exists(destination) && upgradeMethod.SelectedIndex != 3)
File.Delete(destination);
if (Directory.Exists(Path.Combine(@"C:\Temp", "Perfect11_W11_TMP")))
Directory.Delete(Path.Combine(@"C:\Temp", "Perfect11_W11_TMP"), true);
#endif
} catch { }
}
finally
{
_isDownloading = false;
upgradeButton.Text = "Install";
upgradeButton.Enabled = true;
upgradeMethod.Enabled = true;
if (upgradeMethod.SelectedIndex == 3 || upgradeMethod.SelectedIndex == 2) // Both Mini11 and custom ISO
{
automateOOBECheck.Enabled = false;
automateOOBECheck.Checked = false;
bypassWin11RequirementsCheck.Enabled = false;
bypassWin11RequirementsCheck.Checked = false;
}
if (upgradeMethod.SelectedIndex != 0 && upgradeMethod.SelectedIndex != 1) // if not normal installation
{
bypassWin11RequirementsCheck.Enabled = false;
bypassWin11RequirementsCheck.Checked = false;
}
else
{
automateOOBECheck.Enabled = true;
bypassWin11RequirementsCheck.Enabled = true;
bypassWin11RequirementsCheck.Checked = true;
}
_cts = null;
}
}
public async Task DownloadFileAsync(string url, string destinationPath, CancellationToken token)
{
using (HttpClient client = new HttpClient { Timeout = TimeSpan.FromHours(2) })
using (HttpResponseMessage response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead, token))
using (Stream contentStream = await response.Content.ReadAsStreamAsync())
using (FileStream fileStream = new FileStream(destinationPath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true))
{
long? totalBytes = response.Content.Headers.ContentLength;
long totalRead = 0;
byte[] buffer = new byte[8192];
int bytesRead;
DateTime lastUpdate = DateTime.Now;
while ((bytesRead = await contentStream.ReadAsync(buffer, 0, buffer.Length, token)) > 0)
{
await fileStream.WriteAsync(buffer, 0, bytesRead, token);
totalRead += bytesRead;
if (totalBytes.HasValue)
{
int progress = (int)((totalRead * 100L) / totalBytes.Value);
if (progress > 100) progress = 100;
installProgress.Value = progress;
statusLabel.Text = $"ISO Download Progress: {progress}%";
// Aggiorna la UI ogni ~200ms
if ((DateTime.Now - lastUpdate).TotalMilliseconds > 200)
{
Application.DoEvents();
lastUpdate = DateTime.Now;
}
}
}
}
}
private async Task ExtractIsoWithProgress(string isoPath, string extractPath, CancellationToken token)
{
string sevenZipPath = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), @"Tools\7z.exe");
if (!File.Exists(sevenZipPath))
throw new FileNotFoundException("7-Zip not found.");
ProcessStartInfo psi = new ProcessStartInfo
{
FileName = sevenZipPath,
Arguments = $"x -o\"{extractPath}\" -y -bsp1 -bso1 \"{isoPath}\"",
RedirectStandardOutput = true,
UseShellExecute = false,
CreateNoWindow = true
};
using (Process proc = new Process { StartInfo = psi })
{
proc.Start();
string line;
int lastPercent = 0;
var regex = new Regex(@"(\d+)%");
Invoke(new Action(() =>
{
installProgress.Value = 0;
statusLabel.Text = "Extracting files...";
}));
await Task.Run(() =>
{
while (!proc.HasExited)
{
token.ThrowIfCancellationRequested();
line = proc.StandardOutput.ReadLine();
if (line == null)
continue;
var match = regex.Match(line);
if (match.Success)
{
int percent = int.Parse(match.Groups[1].Value);
if (percent != lastPercent)
{
lastPercent = percent;
Invoke(new Action(() =>
{
installProgress.Value = percent;
statusLabel.Text = $"Extracting... {percent}%";
}));
}
}
}
}, token);
proc.WaitForExit();
if (proc.ExitCode != 0)
throw new Exception($"7-Zip exited with code {proc.ExitCode}");
}
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
if (_cts != null)
e.Cancel = true;
}
} }
} }

View File

@@ -120,6 +120,14 @@
<metadata name="controlBoxEdit1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="controlBoxEdit1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<data name="poisonLabel6.Text" xml:space="preserve">
<value>1. It's completely free and you can revert to Windows 10 if you don't like it
2. Better security
3. A new UI
4. Better productivity
5. Features for developers: Sudo and Dev Drives
6. Compatible with all apps running on Windows 10</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>

View File

@@ -1,7 +1,9 @@
using Microsoft.Win32; using Microsoft.Win32;
using Newtonsoft.Json;
using Perfect11.TweaksInterface; using Perfect11.TweaksInterface;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
@@ -9,6 +11,12 @@ using System.Security.Principal;
namespace Perfect11.Library namespace Perfect11.Library
{ {
public class AppInfo
{
public string Name { get; set; }
public string Id { get; set; }
public bool Install { get; set; }
}
public class Utilities public class Utilities
{ {
public static bool IsWindows11() public static bool IsWindows11()
@@ -106,5 +114,38 @@ namespace Perfect11.Library
return $"Error: {ex.Message}"; return $"Error: {ex.Message}";
} }
} }
public static string GetLanguageCode()
{
string languageCode = CultureInfo.CurrentUICulture.Name;
return languageCode.ToLower();
}
public static List<AppInfo> LoadApps(string resourceName)
{
var assembly = Assembly.GetExecutingAssembly();
using (Stream stream = assembly.GetManifestResourceStream(resourceName))
{
if (stream == null)
{
Console.WriteLine("Resource not found: " + resourceName);
return new List<AppInfo>();
}
using (StreamReader reader = new StreamReader(stream))
{
string json = reader.ReadToEnd();
try
{
var apps = JsonConvert.DeserializeObject<List<AppInfo>>(json);
return apps ?? new List<AppInfo>();
}
catch (Exception ex)
{
Console.WriteLine("Error parsing JSON: " + ex.Message);
return new List<AppInfo>();
}
}
}
}
} }
} }

View File

@@ -28,6 +28,8 @@
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@@ -60,6 +62,9 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.VisualBasic" /> <Reference Include="Microsoft.VisualBasic" />
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="ReaLTaiizor, Version=3.8.1.3, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ReaLTaiizor, Version=3.8.1.3, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ReaLTaiizor.3.8.1.3\lib\net48\ReaLTaiizor.dll</HintPath> <HintPath>..\packages\ReaLTaiizor.3.8.1.3\lib\net48\ReaLTaiizor.dll</HintPath>
</Reference> </Reference>
@@ -111,6 +116,12 @@
<DependentUpon>Settings.settings</DependentUpon> <DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput> <DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile> </Compile>
<None Include="Tools\7z.sfx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Tools\7zCon.sfx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="App.config" /> <None Include="App.config" />
@@ -131,6 +142,17 @@
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Tools\7-zip.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Tools\7z.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Tools\7z.exe">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Resources\unattend-OOBEAutomate.xml" />
<None Include="Resources\EI.CFG.txt" />
<Content Include="Resources\UWPSystemAppList.txt" /> <Content Include="Resources\UWPSystemAppList.txt" />
<Content Include="Simpleicons-Team-Simple-Windows-11.ico" /> <Content Include="Simpleicons-Team-Simple-Windows-11.ico" />
</ItemGroup> </ItemGroup>

View File

@@ -15,16 +15,11 @@ namespace Perfect11
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
// Check if the system is Windows 11
if (!Utilities.IsWindows11())
{
MessageBox.Show("This tool requires Windows 11!","Perfect11",MessageBoxButtons.OK,MessageBoxIcon.Error);
}
// Hide exception window because of some nags with the library. // Hide exception window because of some nags with the library.
#if DEBUG #if DEBUG
Application.ThreadException += (s, e) => Application.ThreadException += (s, e) =>
{ {
Console.WriteLine($"Errore: {e.Exception.Message}\n{e.Exception.StackTrace}"); Console.WriteLine($"Error: {e.Exception.Message}\n{e.Exception.StackTrace}");
}; };
#else #else
Application.ThreadException += (s, e) => { }; Application.ThreadException += (s, e) => { };

View File

@@ -61,7 +61,52 @@ namespace Perfect11.Properties {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to . /// Looks up a localized string similar to [Channel]
///OEM
///[VL]
///0.
/// </summary>
internal static string EI_CFG {
get {
return ResourceManager.GetString("EI_CFG", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
///&lt;unattend xmlns=&quot;urn:schemas-microsoft-com:unattend&quot;&gt;
/// &lt;settings pass=&quot;oobeSystem&quot;&gt;
/// &lt;component name=&quot;Microsoft-Windows-Shell-Setup&quot; processorArchitecture=&quot;amd64&quot; publicKeyToken=&quot;31bf3856ad364e35&quot; language=&quot;neutral&quot; versionScope=&quot;nonSxS&quot; xmlns:wcm=&quot;http://schemas.microsoft.com/WMIConfig/2002/State&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
/// &lt;OOBE&gt;
/// &lt;HideEULAPage&gt;true&lt;/HideEULAPage&gt;
/// &lt;HideOEMRegistrat [rest of string was truncated]&quot;;.
/// </summary>
internal static string unattend_OOBEAutomate {
get {
return ResourceManager.GetString("unattend_OOBEAutomate", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1527c705-839a-4832-9118-54d4Bd6a0c89
///c5e2524a-ea46-4f67-841f-6a9465d9d515
///E2A4F912-2574-4A75-9BB0-0D023378592B
///F46D4000-FD22-4DB4-AC8E-4E1DDDE828FE
///InputApp
///Microsoft.AAD.BrokerPlugin
///Microsoft.AccountsControl
///Microsoft.Advertising.Xaml
///Microsoft.AsyncTextService
///Microsoft.BioEnrollment
///Microsoft.CredDialogHost
///Microsoft.ECApp
///Microsoft.LockApp
///Microsoft.MicrosoftEdge
///Microsoft.MicrosoftEdgeDevToolsClient
///Microsoft.NET
///Microsoft.PPIProjection
///Microsoft.Services.Store.Engagement
///Microsoft.V [rest of string was truncated]&quot;;.
/// </summary> /// </summary>
internal static string UWPSystemAppList { internal static string UWPSystemAppList {
get { get {

View File

@@ -118,6 +118,12 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="EI_CFG" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\EI.CFG.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="unattend_OOBEAutomate" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\unattend-OOBEAutomate.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data>
<data name="UWPSystemAppList" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="UWPSystemAppList" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\UWPSystemAppList.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value> <value>..\Resources\UWPSystemAppList.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
</data> </data>

View File

@@ -0,0 +1,4 @@
[Channel]
OEM
[VL]
0

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>
</component>
</settings>
</unattend>

BIN
Perfect11/Tools/7-zip.dll Normal file

Binary file not shown.

BIN
Perfect11/Tools/7z.dll Normal file

Binary file not shown.

BIN
Perfect11/Tools/7z.exe Normal file

Binary file not shown.

BIN
Perfect11/Tools/7z.sfx Normal file

Binary file not shown.

BIN
Perfect11/Tools/7zCon.sfx Normal file

Binary file not shown.

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Newtonsoft.Json" version="13.0.4" targetFramework="net48" />
<package id="ReaLTaiizor" version="3.8.1.3" targetFramework="net48" /> <package id="ReaLTaiizor" version="3.8.1.3" targetFramework="net48" />
</packages> </packages>

View File

@@ -0,0 +1,55 @@
<?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>{0BCF623D-B134-4824-9167-2F0A39532BDD}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Perfect11.Inbox.DisableAds</RootNamespace>
<AssemblyName>Perfect11.Inbox.DisableAds</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Tweak.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Perfect11.TweaksInterface\Perfect11.TweaksInterface.csproj">
<Project>{b3f8761a-b4b2-4378-9fe8-06bbfc39fce6}</Project>
<Name>Perfect11.TweaksInterface</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Perfect11 Inbox Tweaks")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Vichingo455")]
[assembly: AssemblyProduct("Perfect11")]
[assembly: AssemblyCopyright("Copyright © 2025 Vichingo455")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0bcf623d-b134-4824-9167-2f0a39532bdd")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,57 @@
using Microsoft.Win32;
using Perfect11.TweaksInterface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Perfect11.Inbox.DisableAds
{
public class Tweak : IPlugin
{
public string Name => "Disable ADs";
public string Description => "Disables ADs and promotions in Windows.";
public string Category => "Annoyances";
public string Execute()
{
// 1 ContentDeliveryManager
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"))
{
key?.SetValue("SubscribedContent-338393Enabled", 0, RegistryValueKind.DWord);
key?.SetValue("RotatingLockScreenEnabled", 0, RegistryValueKind.DWord);
key?.SetValue("RotatingLockScreenOverlayEnabled", 0, RegistryValueKind.DWord);
key?.SetValue("SubscribedContent-338387Enabled", 0, RegistryValueKind.DWord);
key?.SetValue("SilentInstalledAppsEnabled", 0, RegistryValueKind.DWord);
key?.SetValue("SoftLandingEnabled", 0, RegistryValueKind.DWord);
}
// 2 AdvertisingInfo
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo"))
{
key?.SetValue("Enabled", 0, RegistryValueKind.DWord);
}
// 3 Privacy
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Privacy"))
{
key?.SetValue("TailoredExperiencesWithDiagnosticDataEnabled", 0, RegistryValueKind.DWord);
}
// 4 Explorer
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"))
{
key?.SetValue("Start_IrisRecommendations", 0, RegistryValueKind.DWord);
key?.SetValue("ShowSyncProviderNotifications", 0, RegistryValueKind.DWord);
}
// 5 UserProfileEngagement
using (RegistryKey key = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\UserProfileEngagement"))
{
key?.SetValue("ScoobeSystemSettingEnabled", 0, RegistryValueKind.DWord);
}
return "ADs disabled successfully.";
}
}
}

View File

@@ -0,0 +1,54 @@
<?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>{77376E26-3164-4ED7-9F85-02B3AEBFC751}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Perfect11.Inbox.Spotlight</RootNamespace>
<AssemblyName>Perfect11.Inbox.Spotlight</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Tweak.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Perfect11.TweaksInterface\Perfect11.TweaksInterface.csproj">
<Project>{b3f8761a-b4b2-4378-9fe8-06bbfc39fce6}</Project>
<Name>Perfect11.TweaksInterface</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,33 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Perfect11 Inbox Tweaks")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Vichingo455")]
[assembly: AssemblyProduct("Perfect11")]
[assembly: AssemblyCopyright("Copyright © 2025 Vichingo455")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("77376e26-3164-4ed7-9f85-02b3aebfc751")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,108 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Win32;
using Perfect11.TweaksInterface;
namespace Perfect11.Inbox.Spotlight
{
public class Tweak : IPlugin
{
public string Name => "Enable/Disable Windows Spotlight";
public string Description => "Enable or Disable Windows Spotlight feature";
public string Category => "Annoyances";
public string Execute()
{
bool IsNotWindowsSpotlight()
{
const string keyPath = @"SOFTWARE\Policies\Microsoft\Windows\CloudContent";
const string valueName = "DisableWindowsSpotlightFeatures";
try
{
using (RegistryKey key = Registry.CurrentUser.OpenSubKey(keyPath))
{
if (key == null)
return false;
object value = key.GetValue(valueName);
if (value == null)
return false;
if (value is int intValue)
return intValue == 1;
string stringValue = value.ToString();
if (int.TryParse(stringValue, out int parsed))
return parsed == 1;
return false;
}
}
catch (Exception)
{
return false;
}
}
if (!IsNotWindowsSpotlight())
{
using (var key = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Policies\Microsoft\Windows\CloudContent"))
{
key?.SetValue("DisableCloudOptimizedContent", 1, RegistryValueKind.DWord);
}
using (var key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Policies\Microsoft\Windows\CloudContent"))
{
key?.SetValue("DisableWindowsSpotlightFeatures", 1, RegistryValueKind.DWord);
key?.SetValue("DisableWindowsSpotlightWindowsWelcomeExperience", 1, RegistryValueKind.DWord);
key?.SetValue("DisableWindowsSpotlightOnActionCenter", 1, RegistryValueKind.DWord);
key?.SetValue("DisableWindowsSpotlightOnSettings", 1, RegistryValueKind.DWord);
key?.SetValue("DisableThirdPartySuggestions", 1, RegistryValueKind.DWord);
}
using (var key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"))
{
key?.SetValue("ContentDeliveryAllowed", 0, RegistryValueKind.DWord);
key?.SetValue("FeatureManagementEnabled", 0, RegistryValueKind.DWord);
key?.SetValue("SubscribedContentEnabled", 0, RegistryValueKind.DWord);
key?.SetValue("SubscribedContent-338387Enabled", 0, RegistryValueKind.DWord);
key?.SetValue("RotatingLockScreenOverlayEnabled", 0, RegistryValueKind.DWord);
}
using (var key = Registry.CurrentUser.CreateSubKey(
@"Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel"))
{
key?.SetValue("{2cc5ca98-6485-489a-920e-b3e88a6ccce3}", 1, RegistryValueKind.DWord);
}
return "Spotlight was disabled successfully.";
}
else
{
using (var key = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Policies\Microsoft\Windows\CloudContent"))
{
key.DeleteValue("DisableCloudOptimizedContent", false);
}
using (var key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Policies\Microsoft\Windows\CloudContent"))
{
key.DeleteValue("DisableWindowsSpotlightFeatures", false);
key.DeleteValue("DisableWindowsSpotlightWindowsWelcomeExperience", false);
key.DeleteValue("DisableWindowsSpotlightOnActionCenter", false);
key.DeleteValue("DisableWindowsSpotlightOnSettings", false);
key.DeleteValue("DisableThirdPartySuggestions", false);
}
using (var key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"))
{
key.DeleteValue("ContentDeliveryAllowed", false);
key.DeleteValue("FeatureManagementEnabled", false);
key.DeleteValue("SubscribedContentEnabled", false);
key.DeleteValue("SubscribedContent-338387Enabled", false);
key.DeleteValue("RotatingLockScreenOverlayEnabled", false);
}
using (var key = Registry.CurrentUser.CreateSubKey(
@"Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel"))
{
key.DeleteValue("{2cc5ca98-6485-489a-920e-b3e88a6ccce3}", false);
}
return "Spotlight was enabled successfully.";
}
}
}
}