mirror of
https://github.com/Sycnex/Windows10Debloater.git
synced 2024-11-24 11:45:29 +00:00
Merge pull request #286 from tlejolivet/master
New simple designed UI for a better look !
This commit is contained in:
commit
e658a04002
@ -210,152 +210,270 @@ $global:WhiteListedAppsRegex = $global:WhiteListedApps -join '|'
|
||||
Add-Type -AssemblyName System.Windows.Forms
|
||||
[System.Windows.Forms.Application]::EnableVisualStyles()
|
||||
|
||||
#region begin GUI
|
||||
$Form = New-Object System.Windows.Forms.Form
|
||||
$Form.ClientSize = '800,500'
|
||||
$Form.Text = "Windows10Debloater"
|
||||
$Form = New-Object system.Windows.Forms.Form
|
||||
$Form.ClientSize = New-Object System.Drawing.Point(500,570)
|
||||
$Form.StartPosition = 'CenterScreen'
|
||||
$Form.FormBorderStyle = 'FixedSingle'
|
||||
$Form.MinimizeBox = $false
|
||||
$Form.MaximizeBox = $false
|
||||
$Form.ShowIcon = $false
|
||||
$Form.text = "Windows10Debloater"
|
||||
$Form.TopMost = $false
|
||||
$Form.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#252525")
|
||||
|
||||
$Debloat = New-Object System.Windows.Forms.Label
|
||||
$Debloat.Text = "Debloat Options"
|
||||
$DebloatPanel = New-Object system.Windows.Forms.Panel
|
||||
$DebloatPanel.height = 160
|
||||
$DebloatPanel.width = 480
|
||||
$DebloatPanel.Anchor = 'top,right,left'
|
||||
$DebloatPanel.location = New-Object System.Drawing.Point(10,10)
|
||||
|
||||
$RegistryPanel = New-Object system.Windows.Forms.Panel
|
||||
$RegistryPanel.height = 80
|
||||
$RegistryPanel.width = 480
|
||||
$RegistryPanel.Anchor = 'top,right,left'
|
||||
$RegistryPanel.location = New-Object System.Drawing.Point(10,180)
|
||||
|
||||
$CortanaPanel = New-Object system.Windows.Forms.Panel
|
||||
$CortanaPanel.height = 120
|
||||
$CortanaPanel.width = 153
|
||||
$CortanaPanel.Anchor = 'top,right,left'
|
||||
$CortanaPanel.location = New-Object System.Drawing.Point(10,270)
|
||||
|
||||
$EdgePanel = New-Object system.Windows.Forms.Panel
|
||||
$EdgePanel.height = 120
|
||||
$EdgePanel.width = 154
|
||||
$EdgePanel.Anchor = 'top,right,left'
|
||||
$EdgePanel.location = New-Object System.Drawing.Point(173,270)
|
||||
|
||||
$DarkThemePanel = New-Object system.Windows.Forms.Panel
|
||||
$DarkThemePanel.height = 120
|
||||
$DarkThemePanel.width = 153
|
||||
$DarkThemePanel.Anchor = 'top,right,left'
|
||||
$DarkThemePanel.location = New-Object System.Drawing.Point(337,270)
|
||||
|
||||
$OtherPanel = New-Object system.Windows.Forms.Panel
|
||||
$OtherPanel.height = 160
|
||||
$OtherPanel.width = 480
|
||||
$OtherPanel.Anchor = 'top,right,left'
|
||||
$OtherPanel.location = New-Object System.Drawing.Point(10,400)
|
||||
|
||||
$Debloat = New-Object system.Windows.Forms.Label
|
||||
$Debloat.text = "DEBLOAT OPTIONS"
|
||||
$Debloat.AutoSize = $true
|
||||
$Debloat.Width = 25
|
||||
$Debloat.Height = 10
|
||||
$Debloat.Location = New-Object System.Drawing.Point(9, 8)
|
||||
$Debloat.Font = 'Microsoft Sans Serif,12,style=Bold,Underline'
|
||||
$Debloat.width = 457
|
||||
$Debloat.height = 142
|
||||
$Debloat.Anchor = 'top,right,left'
|
||||
$Debloat.location = New-Object System.Drawing.Point(10,9)
|
||||
$Debloat.Font = New-Object System.Drawing.Font('Consolas',15,[System.Drawing.FontStyle]([System.Drawing.FontStyle]::Bold))
|
||||
$Debloat.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$CustomizeBlacklist = New-Object system.Windows.Forms.Button
|
||||
$CustomizeBlacklist.FlatStyle = 'Flat'
|
||||
$CustomizeBlacklist.text = "CUSTOMISE BLACKLIST"
|
||||
$CustomizeBlacklist.width = 460
|
||||
$CustomizeBlacklist.height = 30
|
||||
$CustomizeBlacklist.Anchor = 'top,right,left'
|
||||
$CustomizeBlacklist.location = New-Object System.Drawing.Point(10,40)
|
||||
$CustomizeBlacklist.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$CustomizeBlacklist.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$CustomizeBlacklists = New-Object System.Windows.Forms.Button
|
||||
$CustomizeBlacklists.Text = "Customize Blacklist"
|
||||
$CustomizeBlacklists.Width = 140
|
||||
$CustomizeBlacklists.Height = 40
|
||||
$CustomizeBlacklists.Location = New-Object System.Drawing.Point(9, 32)
|
||||
$CustomizeBlacklists.Font = 'Microsoft Sans Serif,10'
|
||||
$RemoveAllBloatware = New-Object system.Windows.Forms.Button
|
||||
$RemoveAllBloatware.FlatStyle = 'Flat'
|
||||
$RemoveAllBloatware.text = "REMOVE ALL BLOATWARE"
|
||||
$RemoveAllBloatware.width = 460
|
||||
$RemoveAllBloatware.height = 30
|
||||
$RemoveAllBloatware.Anchor = 'top,right,left'
|
||||
$RemoveAllBloatware.location = New-Object System.Drawing.Point(10,80)
|
||||
$RemoveAllBloatware.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$RemoveAllBloatware.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$RemoveAllBloatware = New-Object System.Windows.Forms.Button
|
||||
$RemoveAllBloatware.Text = "Remove All Bloatware"
|
||||
$RemoveAllBloatware.Width = 142
|
||||
$RemoveAllBloatware.Height = 40
|
||||
$RemoveAllBloatware.Location = New-Object System.Drawing.Point(8, 79)
|
||||
$RemoveAllBloatware.Font = 'Microsoft Sans Serif,10'
|
||||
$RemoveBlacklistedBloatware = New-Object system.Windows.Forms.Button
|
||||
$RemoveBlacklistedBloatware.FlatStyle = 'Flat'
|
||||
$RemoveBlacklistedBloatware.text = "REMOVE BLOATWARE WITH CUSTOM BLACKLIST"
|
||||
$RemoveBlacklistedBloatware.width = 460
|
||||
$RemoveBlacklistedBloatware.height = 30
|
||||
$RemoveBlacklistedBloatware.Anchor = 'top,right,left'
|
||||
$RemoveBlacklistedBloatware.location = New-Object System.Drawing.Point(10,120)
|
||||
$RemoveBlacklistedBloatware.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$RemoveBlacklistedBloatware.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$RemoveBlacklist = New-Object System.Windows.Forms.Button
|
||||
$RemoveBlacklist.Text = "Remove Bloatware With Customized Blacklist"
|
||||
$RemoveBlacklist.Width = 205
|
||||
$RemoveBlacklist.Height = 37
|
||||
$RemoveBlacklist.Location = New-Object System.Drawing.Point(9, 124)
|
||||
$RemoveBlacklist.Font = 'Microsoft Sans Serif,10'
|
||||
$Registry = New-Object system.Windows.Forms.Label
|
||||
$Registry.text = "REGISTRY CHANGES"
|
||||
$Registry.AutoSize = $true
|
||||
$Registry.width = 457
|
||||
$Registry.height = 142
|
||||
$Registry.Anchor = 'top,right,left'
|
||||
$Registry.location = New-Object System.Drawing.Point(10,10)
|
||||
$Registry.Font = New-Object System.Drawing.Font('Consolas',15,[System.Drawing.FontStyle]([System.Drawing.FontStyle]::Bold))
|
||||
$Registry.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$Label1 = New-Object System.Windows.Forms.Label
|
||||
$Label1.Text = "Revert Registry Changes"
|
||||
$Label1.AutoSize = $true
|
||||
$Label1.Width = 25
|
||||
$Label1.Height = 10
|
||||
$Label1.Location = New-Object System.Drawing.Point(254, 7)
|
||||
$Label1.Font = 'Microsoft Sans Serif,12,style=Bold,Underline'
|
||||
$RevertChanges = New-Object system.Windows.Forms.Button
|
||||
$RevertChanges.FlatStyle = 'Flat'
|
||||
$RevertChanges.text = "REVERT REGISTRY CHANGES"
|
||||
$RevertChanges.width = 460
|
||||
$RevertChanges.height = 30
|
||||
$RevertChanges.Anchor = 'top,right,left'
|
||||
$RevertChanges.location = New-Object System.Drawing.Point(10,40)
|
||||
$RevertChanges.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$RevertChanges.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$RevertChange = New-Object System.Windows.Forms.Button
|
||||
$RevertChange.Text = "Revert Registry Changes"
|
||||
$RevertChange.Width = 113
|
||||
$RevertChange.Height = 36
|
||||
$RevertChange.Location = New-Object System.Drawing.Point(254, 32)
|
||||
$RevertChange.Font = 'Microsoft Sans Serif,10'
|
||||
$Cortana = New-Object system.Windows.Forms.Label
|
||||
$Cortana.text = "CORTANA"
|
||||
$Cortana.AutoSize = $true
|
||||
$Cortana.width = 457
|
||||
$Cortana.height = 142
|
||||
$Cortana.Anchor = 'top,right,left'
|
||||
$Cortana.location = New-Object System.Drawing.Point(10,10)
|
||||
$Cortana.Font = New-Object System.Drawing.Font('Consolas',15,[System.Drawing.FontStyle]([System.Drawing.FontStyle]::Bold))
|
||||
$Cortana.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$Label2 = New-Object System.Windows.Forms.Label
|
||||
$Label2.Text = "Optional Changes/Fixes"
|
||||
$Label2.AutoSize = $true
|
||||
$Label2.Width = 25
|
||||
$Label2.Height = 10
|
||||
$Label2.Location = New-Object System.Drawing.Point(9, 193)
|
||||
$Label2.Font = 'Microsoft Sans Serif,12,style=Bold,Underline'
|
||||
$EnableCortana = New-Object system.Windows.Forms.Button
|
||||
$EnableCortana.FlatStyle = 'Flat'
|
||||
$EnableCortana.text = "ENABLE"
|
||||
$EnableCortana.width = 133
|
||||
$EnableCortana.height = 30
|
||||
$EnableCortana.Anchor = 'top,right,left'
|
||||
$EnableCortana.location = New-Object System.Drawing.Point(10,40)
|
||||
$EnableCortana.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$EnableCortana.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$DisableCortana = New-Object System.Windows.Forms.Button
|
||||
$DisableCortana.Text = "Disable Cortana"
|
||||
$DisableCortana.Width = 111
|
||||
$DisableCortana.Height = 36
|
||||
$DisableCortana.Location = New-Object System.Drawing.Point(9, 217)
|
||||
$DisableCortana.Font = 'Microsoft Sans Serif,10'
|
||||
$DisableCortana = New-Object system.Windows.Forms.Button
|
||||
$DisableCortana.FlatStyle = 'Flat'
|
||||
$DisableCortana.text = "DISABLE"
|
||||
$DisableCortana.width = 133
|
||||
$DisableCortana.height = 30
|
||||
$DisableCortana.Anchor = 'top,right,left'
|
||||
$DisableCortana.location = New-Object System.Drawing.Point(10,80)
|
||||
$DisableCortana.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$DisableCortana.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$EnableCortana = New-Object System.Windows.Forms.Button
|
||||
$EnableCortana.Text = "Enable Cortana"
|
||||
$EnableCortana.Width = 112
|
||||
$EnableCortana.Height = 36
|
||||
$EnableCortana.Location = New-Object System.Drawing.Point(9, 260)
|
||||
$EnableCortana.Font = 'Microsoft Sans Serif,10'
|
||||
$Edge = New-Object system.Windows.Forms.Label
|
||||
$Edge.text = "EDGE PDF"
|
||||
$Edge.AutoSize = $true
|
||||
$Edge.width = 457
|
||||
$Edge.height = 142
|
||||
$Edge.Anchor = 'top,right,left'
|
||||
$Edge.location = New-Object System.Drawing.Point(10,10)
|
||||
$Edge.Font = New-Object System.Drawing.Font('Consolas',15,[System.Drawing.FontStyle]([System.Drawing.FontStyle]::Bold))
|
||||
$Edge.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$StopEdgePDFTakeover = New-Object System.Windows.Forms.Button
|
||||
$StopEdgePDFTakeover.Text = "Stop Edge PDF Takeover"
|
||||
$StopEdgePDFTakeover.Width = 175
|
||||
$StopEdgePDFTakeover.Height = 35
|
||||
$StopEdgePDFTakeover.Location = New-Object System.Drawing.Point(155, 217)
|
||||
$StopEdgePDFTakeover.Font = 'Microsoft Sans Serif,10'
|
||||
$EnableEdgePDFTakeover = New-Object system.Windows.Forms.Button
|
||||
$EnableEdgePDFTakeover.FlatStyle = 'Flat'
|
||||
$EnableEdgePDFTakeover.text = "ENABLE"
|
||||
$EnableEdgePDFTakeover.width = 134
|
||||
$EnableEdgePDFTakeover.height = 30
|
||||
$EnableEdgePDFTakeover.Anchor = 'top,right,left'
|
||||
$EnableEdgePDFTakeover.location = New-Object System.Drawing.Point(10,40)
|
||||
$EnableEdgePDFTakeover.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$EnableEdgePDFTakeover.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$EnableEdgePDFTakeover = New-Object System.Windows.Forms.Button
|
||||
$EnableEdgePDFTakeover.Text = "Enable Edge PDF Takeover"
|
||||
$EnableEdgePDFTakeover.Width = 185
|
||||
$EnableEdgePDFTakeover.Height = 35
|
||||
$EnableEdgePDFTakeover.Location = New-Object System.Drawing.Point(155, 260)
|
||||
$EnableEdgePDFTakeover.Font = 'Microsoft Sans Serif,10'
|
||||
$DisableEdgePDFTakeover = New-Object system.Windows.Forms.Button
|
||||
$DisableEdgePDFTakeover.FlatStyle = 'Flat'
|
||||
$DisableEdgePDFTakeover.text = "DISABLE"
|
||||
$DisableEdgePDFTakeover.width = 134
|
||||
$DisableEdgePDFTakeover.height = 30
|
||||
$DisableEdgePDFTakeover.Anchor = 'top,right,left'
|
||||
$DisableEdgePDFTakeover.location = New-Object System.Drawing.Point(10,80)
|
||||
$DisableEdgePDFTakeover.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$DisableEdgePDFTakeover.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$DisableTelemetry = New-Object System.Windows.Forms.Button
|
||||
$DisableTelemetry.Text = "Disable Telemetry/Tasks"
|
||||
$DisableTelemetry.Width = 152
|
||||
$DisableTelemetry.Height = 35
|
||||
$DisableTelemetry.Location = New-Object System.Drawing.Point(365, 260)
|
||||
$DisableTelemetry.Font = 'Microsoft Sans Serif,10'
|
||||
$Theme = New-Object system.Windows.Forms.Label
|
||||
$Theme.text = "DARK THEME"
|
||||
$Theme.AutoSize = $true
|
||||
$Theme.width = 457
|
||||
$Theme.height = 142
|
||||
$Theme.Anchor = 'top,right,left'
|
||||
$Theme.location = New-Object System.Drawing.Point(10,10)
|
||||
$Theme.Font = New-Object System.Drawing.Font('Consolas',15,[System.Drawing.FontStyle]([System.Drawing.FontStyle]::Bold))
|
||||
$Theme.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$RemoveRegkeys = New-Object System.Windows.Forms.Button
|
||||
$RemoveRegkeys.Text = "Remove Bloatware Regkeys"
|
||||
$RemoveRegkeys.Width = 188
|
||||
$RemoveRegkeys.Height = 35
|
||||
$RemoveRegkeys.Location = New-Object System.Drawing.Point(540, 260)
|
||||
$RemoveRegkeys.Font = 'Microsoft Sans Serif,10'
|
||||
$EnableDarkMode = New-Object system.Windows.Forms.Button
|
||||
$EnableDarkMode.FlatStyle = 'Flat'
|
||||
$EnableDarkMode.text = "ENABLE"
|
||||
$EnableDarkMode.width = 133
|
||||
$EnableDarkMode.height = 30
|
||||
$EnableDarkMode.Anchor = 'top,right,left'
|
||||
$EnableDarkMode.location = New-Object System.Drawing.Point(10,40)
|
||||
$EnableDarkMode.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$EnableDarkMode.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$UnpinStartMenuTiles = New-Object System.Windows.Forms.Button
|
||||
$UnpinStartMenuTiles.Text = "Unpin Tiles From Start Menu"
|
||||
$UnpinStartMenuTiles.Width = 190
|
||||
$UnpinStartMenuTiles.Height = 35
|
||||
$UnpinStartMenuTiles.Location = New-Object System.Drawing.Point(540, 217)
|
||||
$UnpinStartMenuTiles.Font = 'Microsoft Sans Serif,10'
|
||||
$DisableDarkMode = New-Object system.Windows.Forms.Button
|
||||
$DisableDarkMode.FlatStyle = 'Flat'
|
||||
$DisableDarkMode.text = "DISABLE"
|
||||
$DisableDarkMode.width = 133
|
||||
$DisableDarkMode.height = 30
|
||||
$DisableDarkMode.Anchor = 'top,right,left'
|
||||
$DisableDarkMode.location = New-Object System.Drawing.Point(10,80)
|
||||
$DisableDarkMode.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$DisableDarkMode.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$RemoveOnedrive = New-Object System.Windows.Forms.Button
|
||||
$RemoveOnedrive.Text = "Uninstall OneDrive"
|
||||
$RemoveOnedrive.Width = 152
|
||||
$RemoveOnedrive.Height = 35
|
||||
$RemoveOnedrive.Location = New-Object System.Drawing.Point(365, 217)
|
||||
$RemoveOnedrive.Font = 'Microsoft Sans Serif,10'
|
||||
$Other = New-Object system.Windows.Forms.Label
|
||||
$Other.text = "OTHER CHANGES & FIXES"
|
||||
$Other.AutoSize = $true
|
||||
$Other.width = 457
|
||||
$Other.height = 142
|
||||
$Other.Anchor = 'top,right,left'
|
||||
$Other.location = New-Object System.Drawing.Point(10,10)
|
||||
$Other.Font = New-Object System.Drawing.Font('Consolas',15,[System.Drawing.FontStyle]([System.Drawing.FontStyle]::Bold))
|
||||
$Other.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
#$FixWhitelist = New-Object System.Windows.Forms.Button
|
||||
#$FixWhitelist.Text = "Fix Whitelisted Apps"
|
||||
#$FixWhitelist.Width = 130
|
||||
#$FixWhitelist.Height = 37
|
||||
#$FixWhitelist.Location = New-Object System.Drawing.Point(254, 74)
|
||||
#$FixWhitelist.Font = 'Microsoft Sans Serif,10'
|
||||
$RemoveOnedrive = New-Object system.Windows.Forms.Button
|
||||
$RemoveOnedrive.FlatStyle = 'Flat'
|
||||
$RemoveOnedrive.text = "UNINSTALL ONEDRIVE"
|
||||
$RemoveOnedrive.width = 225
|
||||
$RemoveOnedrive.height = 30
|
||||
$RemoveOnedrive.Anchor = 'top,right,left'
|
||||
$RemoveOnedrive.location = New-Object System.Drawing.Point(10,40)
|
||||
$RemoveOnedrive.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$RemoveOnedrive.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$InstallNet35 = New-Object System.Windows.Forms.Button
|
||||
$InstallNet35.Text = "Install .NET v3.5"
|
||||
$InstallNet35.Width = 152
|
||||
$InstallNet35.Height = 39
|
||||
$InstallNet35.Location = New-Object System.Drawing.Point(169, 335)
|
||||
$InstallNet35.Font = 'Microsoft Sans Serif,10'
|
||||
$UnpinStartMenuTiles = New-Object system.Windows.Forms.Button
|
||||
$UnpinStartMenuTiles.FlatStyle = 'Flat'
|
||||
$UnpinStartMenuTiles.text = "UNPIN TILES FROM START MENU"
|
||||
$UnpinStartMenuTiles.width = 225
|
||||
$UnpinStartMenuTiles.height = 30
|
||||
$UnpinStartMenuTiles.Anchor = 'top,right,left'
|
||||
$UnpinStartMenuTiles.location = New-Object System.Drawing.Point(245,40)
|
||||
$UnpinStartMenuTiles.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$UnpinStartMenuTiles.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$EnableDarkMode = New-Object System.Windows.Forms.Button
|
||||
$EnableDarkMode.Text = "Enable Dark Mode"
|
||||
$EnableDarkMode.Width = 152
|
||||
$EnableDarkMode.Height = 39
|
||||
$EnableDarkMode.Location = New-Object System.Drawing.Point(9, 335)
|
||||
$EnableDarkMode.Font = 'Microsoft Sans Serif,10'
|
||||
$DisableTelemetry = New-Object system.Windows.Forms.Button
|
||||
$DisableTelemetry.FlatStyle = 'Flat'
|
||||
$DisableTelemetry.text = "DISABLE TELEMETRY / TASKS"
|
||||
$DisableTelemetry.width = 225
|
||||
$DisableTelemetry.height = 30
|
||||
$DisableTelemetry.Anchor = 'top,right,left'
|
||||
$DisableTelemetry.location = New-Object System.Drawing.Point(10,80)
|
||||
$DisableTelemetry.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$DisableTelemetry.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$DisableDarkMode = New-Object System.Windows.Forms.Button
|
||||
$DisableDarkMode.Text = "Disable Dark Mode"
|
||||
$DisableDarkMode.Width = 152
|
||||
$DisableDarkMode.Height = 39
|
||||
$DisableDarkMode.Location = New-Object System.Drawing.Point(9, 385)
|
||||
$DisableDarkMode.Font = 'Microsoft Sans Serif,10'
|
||||
$RemoveRegkeys = New-Object system.Windows.Forms.Button
|
||||
$RemoveRegkeys.FlatStyle = 'Flat'
|
||||
$RemoveRegkeys.text = "REMOVE BLOATWARE REGKEYS"
|
||||
$RemoveRegkeys.width = 225
|
||||
$RemoveRegkeys.height = 30
|
||||
$RemoveRegkeys.Anchor = 'top,right,left'
|
||||
$RemoveRegkeys.location = New-Object System.Drawing.Point(245,80)
|
||||
$RemoveRegkeys.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$RemoveRegkeys.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$InstallNet35 = New-Object system.Windows.Forms.Button
|
||||
$InstallNet35.FlatStyle = 'Flat'
|
||||
$InstallNet35.text = "INSTALL .NET V3.5"
|
||||
$InstallNet35.width = 460
|
||||
$InstallNet35.height = 30
|
||||
$InstallNet35.Anchor = 'top,right,left'
|
||||
$InstallNet35.location = New-Object System.Drawing.Point(10,120)
|
||||
$InstallNet35.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$InstallNet35.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
|
||||
$Form.controls.AddRange(@($Debloat, $CustomizeBlacklists, $RemoveAllBloatware, $RemoveBlacklist, $Label1, $RevertChange, $Label2, $DisableCortana, $EnableCortana, $StopEdgePDFTakeover, $EnableEdgePDFTakeover, $DisableTelemetry, $RemoveRegkeys, $UnpinStartMenuTiles, $RemoveOnedrive, $FixWhitelist, $RemoveBloatNoBlacklist, $InstallNet35, $EnableDarkMode, $DisableDarkMode))
|
||||
$Form.controls.AddRange(@($RegistryPanel,$DebloatPanel,$CortanaPanel,$EdgePanel,$DarkThemePanel,$OtherPanel))
|
||||
$DebloatPanel.controls.AddRange(@($Debloat,$CustomizeBlacklist,$RemoveAllBloatware,$RemoveBlacklistedBloatware))
|
||||
$RegistryPanel.controls.AddRange(@($Registry,$RevertChanges))
|
||||
$CortanaPanel.controls.AddRange(@($Cortana,$EnableCortana,$DisableCortana))
|
||||
$EdgePanel.controls.AddRange(@($EnableEdgePDFTakeover,$DisableEdgePDFTakeover,$Edge))
|
||||
$DarkThemePanel.controls.AddRange(@($Theme,$DisableDarkMode,$EnableDarkMode))
|
||||
$OtherPanel.controls.AddRange(@($Other,$RemoveOnedrive,$InstallNet35,$UnpinStartMenuTiles,$DisableTelemetry,$RemoveRegkeys))
|
||||
|
||||
$DebloatFolder = "C:\Temp\Windows10Debloater"
|
||||
If (Test-Path $DebloatFolder) {
|
||||
@ -371,18 +489,38 @@ Else {
|
||||
Start-Transcript -OutputDirectory "${DebloatFolder}"
|
||||
|
||||
#region gui events {
|
||||
$CustomizeBlacklists.Add_Click( {
|
||||
$CustomizeBlacklist.Add_Click( {
|
||||
$CustomizeForm = New-Object System.Windows.Forms.Form
|
||||
$CustomizeForm.ClientSize = '600,400'
|
||||
$CustomizeForm.ClientSize = New-Object System.Drawing.Point(500,570)
|
||||
$CustomizeForm.StartPosition = 'CenterScreen'
|
||||
$CustomizeForm.FormBorderStyle = 'FixedSingle'
|
||||
$CustomizeForm.MinimizeBox = $false
|
||||
$CustomizeForm.MaximizeBox = $false
|
||||
$CustomizeForm.ShowIcon = $false
|
||||
$CustomizeForm.Text = "Customize Whitelist and Blacklist"
|
||||
$CustomizeForm.TopMost = $false
|
||||
$CustomizeForm.AutoScroll = $true
|
||||
$CustomizeForm.AutoScroll = $false
|
||||
$CustomizeForm.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#252525")
|
||||
|
||||
$ListPanel = New-Object system.Windows.Forms.Panel
|
||||
$ListPanel.height = 510
|
||||
$ListPanel.width = 480
|
||||
$ListPanel.Anchor = 'top,right,left'
|
||||
$ListPanel.location = New-Object System.Drawing.Point(10,10)
|
||||
$ListPanel.AutoScroll = $true
|
||||
$ListPanel.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#252525")
|
||||
|
||||
|
||||
$SaveList = New-Object System.Windows.Forms.Button
|
||||
$SaveList.FlatStyle = 'Flat'
|
||||
$SaveList.Text = "Save custom Whitelist and Blacklist to custom-lists.ps1"
|
||||
$SaveList.AutoSize = $true
|
||||
$SaveList.Location = New-Object System.Drawing.Point(200, 5)
|
||||
$CustomizeForm.controls.Add($SaveList)
|
||||
$SaveList.width = 480
|
||||
$SaveList.height = 30
|
||||
$SaveList.Location = New-Object System.Drawing.Point(10, 530)
|
||||
$SaveList.Font = New-Object System.Drawing.Font('Consolas',9)
|
||||
$SaveList.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
|
||||
$CustomizeForm.controls.AddRange(@($SaveList,$ListPanel))
|
||||
|
||||
$SaveList.Add_Click( {
|
||||
$ErrorActionPreference = 'SilentlyContinue'
|
||||
@ -421,25 +559,33 @@ $CustomizeBlacklists.Add_Click( {
|
||||
[bool] $enabled,
|
||||
[Parameter(Mandatory)]
|
||||
[bool] $checked,
|
||||
[Parameter(Mandatory)]
|
||||
[bool] $autocheck,
|
||||
|
||||
[string] $notes
|
||||
)
|
||||
|
||||
$label = New-Object System.Windows.Forms.Label
|
||||
$label.Location = New-Object System.Drawing.Point(2, (30 + $position * 16))
|
||||
$label.Location = New-Object System.Drawing.Point(0, (2 + $position * 25))
|
||||
$label.Text = $notes
|
||||
$label.Width = 300
|
||||
$label.Font = New-Object System.Drawing.Font('Consolas',8)
|
||||
$label.Width = 150
|
||||
$label.Height = 16
|
||||
$Label.TextAlign = [System.Drawing.ContentAlignment]::TopRight
|
||||
$CustomizeForm.controls.Add($label)
|
||||
$label.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#888888")
|
||||
$ListPanel.controls.AddRange(@($label))
|
||||
|
||||
$Checkbox = New-Object System.Windows.Forms.CheckBox
|
||||
$Checkbox.Text = $appName
|
||||
$Checkbox.Location = New-Object System.Drawing.Point(320, (30 + $position * 16))
|
||||
$CheckBox.Font = New-Object System.Drawing.Font('Consolas',8)
|
||||
$CheckBox.FlatStyle = 'Flat'
|
||||
$CheckBox.ForeColor = [System.Drawing.ColorTranslator]::FromHtml("#eeeeee")
|
||||
$Checkbox.Location = New-Object System.Drawing.Point(160, (0 + $position * 25))
|
||||
$Checkbox.Autosize = 1;
|
||||
$Checkbox.Checked = $checked
|
||||
$Checkbox.Enabled = $enabled
|
||||
$CustomizeForm.controls.Add($CheckBox)
|
||||
$CheckBox.AutoCheck = $autocheck
|
||||
$ListPanel.controls.AddRange(@($CheckBox))
|
||||
}
|
||||
|
||||
|
||||
@ -455,8 +601,8 @@ $CustomizeBlacklists.Add_Click( {
|
||||
if ( $null -notmatch $Installed -and $Installed -cmatch $item) { $string += "Installed" }
|
||||
if ( $null -notmatch $AllUsers -and $AllUsers -cmatch $item) { $string += " AllUsers" }
|
||||
if ( $null -notmatch $Online -and $Online -cmatch $item) { $string += " Online" }
|
||||
$string += " NONREMOVABLE"
|
||||
AddAppToCustomizeForm $checkboxCounter $item $false $false $string
|
||||
$string += " NON-REMOVABLE"
|
||||
AddAppToCustomizeForm $checkboxCounter $item $true $false $false $string
|
||||
++$checkboxCounter
|
||||
}
|
||||
ForEach ( $item in $global:WhiteListedApps ) {
|
||||
@ -466,7 +612,7 @@ $CustomizeBlacklists.Add_Click( {
|
||||
if ( $null -notmatch $Installed -and $Installed -cmatch $item) { $string += "Installed" }
|
||||
if ( $null -notmatch $AllUsers -and $AllUsers -cmatch $item) { $string += " AllUsers" }
|
||||
if ( $null -notmatch $Online -and $Online -cmatch $item) { $string += " Online" }
|
||||
AddAppToCustomizeForm $checkboxCounter $item $true $false $string
|
||||
AddAppToCustomizeForm $checkboxCounter $item $true $false $true $string
|
||||
++$checkboxCounter
|
||||
}
|
||||
ForEach ( $item in $global:Bloatware ) {
|
||||
@ -476,7 +622,7 @@ $CustomizeBlacklists.Add_Click( {
|
||||
if ( $null -notmatch $Installed -and $Installed -cmatch $item) { $string += "Installed" }
|
||||
if ( $null -notmatch $AllUsers -and $AllUsers -cmatch $item) { $string += " AllUsers" }
|
||||
if ( $null -notmatch $Online -and $Online -cmatch $item) { $string += " Online" }
|
||||
AddAppToCustomizeForm $checkboxCounter $item $true $true $string
|
||||
AddAppToCustomizeForm $checkboxCounter $item $true $true $true $string
|
||||
++$checkboxCounter
|
||||
}
|
||||
ForEach ( $item in $AllUsers ) {
|
||||
@ -486,7 +632,7 @@ $CustomizeBlacklists.Add_Click( {
|
||||
if ( $null -notmatch $global:BloatwareRegex -and $item -cmatch $global:BloatwareRegex ) { continue }
|
||||
if ( $null -notmatch $Installed -and $Installed -cmatch $item) { $string += " Installed" }
|
||||
if ( $null -notmatch $Online -and $Online -cmatch $item) { $string += " Online" }
|
||||
AddAppToCustomizeForm $checkboxCounter $item $true $true $string
|
||||
AddAppToCustomizeForm $checkboxCounter $item $true $true $true $string
|
||||
++$checkboxCounter
|
||||
}
|
||||
ForEach ( $item in $Installed ) {
|
||||
@ -496,7 +642,7 @@ $CustomizeBlacklists.Add_Click( {
|
||||
if ( $null -notmatch $global:BloatwareRegex -and $item -cmatch $global:BloatwareRegex ) { continue }
|
||||
if ( $null -notmatch $AllUsers -and $AllUsers -cmatch $item) { continue }
|
||||
if ( $null -notmatch $Online -and $Online -cmatch $item) { $string += " Online" }
|
||||
AddAppToCustomizeForm $checkboxCounter $item $true $true $string
|
||||
AddAppToCustomizeForm $checkboxCounter $item $true $true $true $string
|
||||
++$checkboxCounter
|
||||
}
|
||||
ForEach ( $item in $Online ) {
|
||||
@ -506,15 +652,14 @@ $CustomizeBlacklists.Add_Click( {
|
||||
if ( $null -notmatch $global:BloatwareRegex -and $item -cmatch $global:BloatwareRegex ) { continue }
|
||||
if ( $null -notmatch $Installed -and $Installed -cmatch $item) { continue }
|
||||
if ( $null -notmatch $AllUsers -and $AllUsers -cmatch $item) { continue }
|
||||
AddAppToCustomizeForm $checkboxCounter $item $true $true $string
|
||||
AddAppToCustomizeForm $checkboxCounter $item $true $true $true $string
|
||||
++$checkboxCounter
|
||||
}
|
||||
[void]$CustomizeForm.ShowDialog()
|
||||
|
||||
})
|
||||
|
||||
|
||||
$RemoveBlacklist.Add_Click( {
|
||||
$RemoveBlacklistedBloatware.Add_Click( {
|
||||
$ErrorActionPreference = 'SilentlyContinue'
|
||||
Function DebloatBlacklist {
|
||||
Write-Host "Requesting removal of $global:BloatwareRegex"
|
||||
@ -809,7 +954,7 @@ $START_MENU_LAYOUT = @"
|
||||
Write-Host "Finished all tasks. `n"
|
||||
|
||||
} )
|
||||
$RevertChange.Add_Click( {
|
||||
$RevertChanges.Add_Click( {
|
||||
$ErrorActionPreference = 'SilentlyContinue'
|
||||
#This function will revert the changes you made when running the Start-Debloat function.
|
||||
|
||||
@ -936,7 +1081,7 @@ $DisableCortana.Add_Click( {
|
||||
Set-ItemProperty $Cortana3 HarvestContacts -Value 0
|
||||
Write-Host "Cortana has been disabled."
|
||||
})
|
||||
$StopEdgePDFTakeover.Add_Click( {
|
||||
$DisableEdgePDFTakeover.Add_Click( {
|
||||
$ErrorActionPreference = 'SilentlyContinue'
|
||||
#Stops edge from taking over as the default .PDF viewer
|
||||
Write-Host "Stopping Edge from taking over as the default .PDF viewer"
|
||||
|
Loading…
Reference in New Issue
Block a user