Merge branch 'master' into master
This commit is contained in:
commit
d4ede6d322
|
@ -1,9 +1,58 @@
|
|||
#https://superuser.com/questions/1068382/how-to-remove-all-the-tiles-in-the-windows-10-start-menu
|
||||
#Unpins all tiles from the Start Menu
|
||||
Write-Output "Unpinning all tiles from the start menu"
|
||||
(New-Object -Com Shell.Application).
|
||||
NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').
|
||||
Items() |
|
||||
%{ $_.Verbs() } |
|
||||
?{$_.Name -match 'Un.*pin from Start'} |
|
||||
%{$_.DoIt()}
|
||||
# https://superuser.com/a/1442733
|
||||
#Requires -RunAsAdministrator
|
||||
|
||||
$START_MENU_LAYOUT = @"
|
||||
<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
|
||||
<LayoutOptions StartTileGroupCellWidth="6" />
|
||||
<DefaultLayoutOverride>
|
||||
<StartLayoutCollection>
|
||||
<defaultlayout:StartLayout GroupCellWidth="6" />
|
||||
</StartLayoutCollection>
|
||||
</DefaultLayoutOverride>
|
||||
</LayoutModificationTemplate>
|
||||
"@
|
||||
|
||||
$layoutFile="C:\Windows\StartMenuLayout.xml"
|
||||
|
||||
#Delete layout file if it already exists
|
||||
If(Test-Path $layoutFile)
|
||||
{
|
||||
Remove-Item $layoutFile
|
||||
}
|
||||
|
||||
#Creates the blank layout file
|
||||
$START_MENU_LAYOUT | Out-File $layoutFile -Encoding ASCII
|
||||
|
||||
$regAliases = @("HKLM", "HKCU")
|
||||
|
||||
#Assign the start layout and force it to apply with "LockedStartLayout" at both the machine and user level
|
||||
foreach ($regAlias in $regAliases){
|
||||
$basePath = $regAlias + ":\SOFTWARE\Policies\Microsoft\Windows"
|
||||
$keyPath = $basePath + "\Explorer"
|
||||
IF(!(Test-Path -Path $keyPath)) {
|
||||
New-Item -Path $basePath -Name "Explorer"
|
||||
}
|
||||
Set-ItemProperty -Path $keyPath -Name "LockedStartLayout" -Value 1
|
||||
Set-ItemProperty -Path $keyPath -Name "StartLayoutFile" -Value $layoutFile
|
||||
}
|
||||
|
||||
#Restart Explorer, open the start menu (necessary to load the new layout), and give it a few seconds to process
|
||||
Stop-Process -name explorer
|
||||
Start-Sleep -s 5
|
||||
$wshell = New-Object -ComObject wscript.shell; $wshell.SendKeys('^{ESCAPE}')
|
||||
Start-Sleep -s 5
|
||||
|
||||
#Enable the ability to pin items again by disabling "LockedStartLayout"
|
||||
foreach ($regAlias in $regAliases){
|
||||
$basePath = $regAlias + ":\SOFTWARE\Policies\Microsoft\Windows"
|
||||
$keyPath = $basePath + "\Explorer"
|
||||
Set-ItemProperty -Path $keyPath -Name "LockedStartLayout" -Value 0
|
||||
}
|
||||
|
||||
#Restart Explorer and delete the layout file
|
||||
Stop-Process -name explorer
|
||||
|
||||
# Uncomment the next line to make clean start menu default for all new users
|
||||
#Import-StartLayout -LayoutPath $layoutFile -MountPath $env:SystemDrive\
|
||||
|
||||
Remove-Item $layoutFile
|
||||
|
|
262
README.md
262
README.md
|
@ -1,153 +1,187 @@
|
|||
|
||||
# Windows10Debloater
|
||||
Script/Utility/Application to debloat, optimize and tweak Windows 10
|
||||
|
||||
[![made-with-powershell](https://img.shields.io/badge/PowerShell-1f425f?logo=Powershell)](https://microsoft.com/PowerShell)
|
||||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
|
||||
|
||||
# Methods to Run Windows10Debloater
|
||||
Script/Utility/Application to debloat Windows 10, to remove Windows pre-installed unnecessary applications, stop some telemetry functions, stop Cortana from being used as your Search Index, to disable unnecessary scheduled tasks, and more...
|
||||
|
||||
There are different methods of running the Windows10Debloater:
|
||||
* with GUI (**recommended**)
|
||||
* Interactive (Commandline)
|
||||
* SysPrep (Silence)
|
||||
## Donate a cup of coffee
|
||||
<a href="https://www.buymeacoffee.com/HZNh7w1Bm" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
|
||||
|
||||
The GUI-Method offers you a simple GUI where you just select your tasks of choice.
|
||||
The Interactive-Method guides you thru all the options - in the console.
|
||||
The SysPrep-Method, is a complete silence way.
|
||||
Be sure to look at the Contributors' Githubs to see if they have GitHub sponsorships as well, since they have contributed to this open source project. (https://github.com/Sycnex/Windows10Debloater/graphs/contributors)
|
||||
|
||||
## Disclaimer
|
||||
|
||||
# How to Run Windows10Debloater
|
||||
**WARNING:** I do **NOT** take responsibility for what may happen to your system! Run scripts at your own risk!
|
||||
Also, other variants of this repo are not technically "new" versions of this, but they are different in their own respective ways. There are some sites saying that other projects are "new" versions of this, but that is inaccurate.
|
||||
|
||||
1. Download the .zip file from the main page and extract it to your desired location.
|
||||
2. Once extracted, start you favorite method by using one of the following batch-files:
|
||||
## How To Run the Windows10Debloater.ps1 and the Windows10DebloaterGUI.ps1 files
|
||||
|
||||
* Start_GUI.bat (**recommended**)
|
||||
* Start_NOGUI.bat (Interactive-Method)
|
||||
* Start_SysPrep.bat (Silence)
|
||||
There are different methods of running the PowerShell script. The methods are as follows:
|
||||
|
||||
### First Method
|
||||
|
||||
# Switch Parameters
|
||||
1) Download the .zip file on the main page of the github and extract the .zip file to your desired location
|
||||
2) Once extracted, open [PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/overview?view=powershell-5.1) (or [PowerShell ISE](https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/ise/introducing-the-windows-powershell-ise?view=powershell-7)) as an Administrator
|
||||
3) Enable PowerShell execution
|
||||
<code>Set-ExecutionPolicy Unrestricted -Force</code>
|
||||
4) On the prompt, change to the directory where you extracted the files:
|
||||
e.g. - `cd c:\temp`
|
||||
5) Next, to run either script, enter in the following:
|
||||
e.g. - `.\Windows10DebloaterGUI.ps1`
|
||||
|
||||
### Second Method
|
||||
|
||||
1) Download the .zip file on the main page of the github and extract the .zip file to your desired location
|
||||
2) Right click the PowerShell file that you'd like to run and click on "Run With PowerShell"
|
||||
3) This will allow the script to run without having to do the above steps but Powershell will ask if you're sure you want to run this script.
|
||||
|
||||
Remember this script **NEEDS** to be run as admin in order to function properly.
|
||||
|
||||
## How To Run the Windows10SysPrepDebloater.ps1 file
|
||||
|
||||
For the WindowsSysPrepDebloater.ps1 file, there are a couple of parameters that you can run so that you can specify which functions are used. The parameters are:
|
||||
`-SysPrep`, `-Debloat` and `-Privacy`.
|
||||
|
||||
To run this with parameters, do the following:
|
||||
|
||||
1) Download the .zip file on the main page of the github and extract the .zip file to your desired location
|
||||
2) Once extracted, open [PowerShell](https://docs.microsoft.com/en-us/powershell/scripting/overview?view=powershell-5.1) (or [PowerShell ISE](https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/ise/introducing-the-windows-powershell-ise?view=powershell-7)) as an Administrator
|
||||
3) On the prompt, change to the directory where you extracted the files:
|
||||
e.g. - `cd c:\temp`
|
||||
4) Next, to run either script, enter in the following:
|
||||
e.g. - `.\Windows10SysPrepDebloater.ps1 -Sysprep, -Debloat -Privacy`
|
||||
|
||||
## Sysprep, Interactive, and GUI Application
|
||||
|
||||
There are now 3 versions of **Windows10Debloater** - There is an interactive version, a GUI app version, and a pure silent version.
|
||||
|
||||
- **`Windows10SysPrepDebloater.ps1`** -> The silent version now utilizes the switch parameters: -Sysprep, -Debloat -Privacy. The silent version can be useful for deploying MDT Images/sysprepping or any other way you deploy Windows 10. This will work to remove the bloatware during the deployment process.
|
||||
|
||||
- **`Windows10Debloater.ps1`** -> This interactive version is what it implies - a Windows10Debloater script with interactive prompts. This one should not be used for deployments that require a silent script with optional parameters. This script gives you choices with prompts as it runs so that you can make the choices of what the script does.
|
||||
|
||||
- **`Windows10DebloaterGUI.ps1`** -> There is now a GUI Application named Windows10DebloaterGUI.ps1 with buttons to perform all of the functions that the scripts do. This is better for the average user who does not want to work with code, or if you'd prefer to just see an application screen.
|
||||
|
||||
## Switch Parameters
|
||||
|
||||
There are 3 switch parameters in the `Windows10SysPrepDebloater.ps1` script.
|
||||
|
||||
The first one is `-SysPrep`, which runs the command within a function: `get-appxpackage | remove-appxpackage`. This is useful since some administrators need that command to run first in order for machines to be able to properly provision the apps for removal.
|
||||
|
||||
The second switch parameter is `-Debloat`, which does as it suggests. It runs the following functions: Start-Debloat, Remove-Keys, and Protect-Privacy.
|
||||
- **`-SysPrep`**, which runs the command within a function: get-appxpackage | remove-appxpackage. This is useful since some administrators need that command to run first in order for machines to be able to properly provision the apps for removal.
|
||||
|
||||
- **`-Debloat`**, switch parameter which does as it suggests. It runs the following functions: Start-Debloat, Remove-Keys, and Protect-Privacy.
|
||||
Remove-Keys removes registry keys leftover that are associated with the bloatware apps listed above, but not removed during the Start-Debloat function.
|
||||
|
||||
Third, Protect-Privacy adds and/or changes registry keys to stop some telemetry functions, stops Cortana from being used as your Search Index, disables "unneccessary" scheduled tasks, and more.
|
||||
- **`-Privacy`**, adds and/or changes registry keys to stop some telemetry functions, stops Cortana from being used as your Search Index, disables "unneccessary" scheduled tasks, and more.
|
||||
|
||||
**This script will remove the bloatware from Windows 10 when using `Remove-AppXPackage`/`Remove-AppXProvisionedPackage`, and then delete specific registry keys that are were not removed beforehand. For best results, this script should be ran before a user profile is configured, otherwise you will likely see that apps that should have been removed will remain, and if they are removed you will find broken tiles on the start menu.**
|
||||
***This script will remove the bloatware from Windows 10 when using Remove-AppXPackage/Remove-AppXProvisionedPackage, and then delete specific registry keys that are were not removed beforehand. For best results, this script should be ran before a user profile is configured, otherwise you will likely see that apps that should have been removed will remain, and if they are removed you will find broken tiles on the start menu.***
|
||||
|
||||
## These registry keys are:
|
||||
## These registry keys are
|
||||
|
||||
* ActiproSoftwareLLC,
|
||||
* EclipseManager,
|
||||
* Microsoft.PPIProjection,
|
||||
* Microsoft.XboxGameCallableUI
|
||||
EclipseManager,
|
||||
ActiproSoftwareLLC,
|
||||
Microsoft.PPIProjection,
|
||||
Microsoft.XboxGameCallableUI
|
||||
|
||||
You can choose to either 'Debloat' or 'Revert'. Depending on your choice, either one will run specific code to either debloat your Windows 10 machine.
|
||||
|
||||
**The Debloat switch choice runs the following functions:**
|
||||
## The Debloat switch choice runs the following functions
|
||||
|
||||
* Debloat
|
||||
* Protect-Privacy
|
||||
* Remove-Keys
|
||||
* Stop-EdgePDF (If chosen)
|
||||
Debloat,
|
||||
Remove-Keys,
|
||||
Protect-Privacy,
|
||||
Stop-EdgePDF (If chosen)
|
||||
|
||||
**The Revert switch choice runs the following functions:**
|
||||
## The Revert switch choice runs the following functions
|
||||
|
||||
* Enable-EdgePDF
|
||||
* Revert-Changes
|
||||
Revert-Changes,
|
||||
Enable-EdgePDF
|
||||
|
||||
The Revert option reinstalls the bloatware and changes your registry keys back to default.
|
||||
|
||||
# The scheduled tasks that are disabled are:
|
||||
## The scheduled tasks that are disabled are
|
||||
|
||||
* Consolidator
|
||||
* DmClient
|
||||
* UsbCeip
|
||||
* XblGameSaveTask
|
||||
* XblGameSaveTaskLogon
|
||||
XblGameSaveTaskLogon,
|
||||
XblGameSaveTask,
|
||||
Consolidator,
|
||||
UsbCeip,
|
||||
DmClient
|
||||
|
||||
These scheduled tasks that are disabled have absolutely no impact on the function of the OS.
|
||||
|
||||
# Bloatware that is removed:
|
||||
## Bloatware that is removed
|
||||
|
||||
* 3DBuilder
|
||||
* ActiproSoftware
|
||||
* Alarms
|
||||
* Appconnector
|
||||
* Asphalt8
|
||||
* Autodesk SketchBook
|
||||
* Bing Finance
|
||||
* Bing Food And Drink
|
||||
* Bing Health And Fitness
|
||||
* Bing News
|
||||
* Bing Sports
|
||||
* Bing Travel
|
||||
* Bing Weather
|
||||
* BioEnrollment
|
||||
* Caesars Slots Free Casino
|
||||
* Camera
|
||||
* CandyCrush
|
||||
* CandyCrushSoda
|
||||
* ContactSupport
|
||||
* CyberLink MediaSuite Essentials
|
||||
* DrawboardPDF
|
||||
* Duolingo
|
||||
* EclipseManager
|
||||
* Facebook
|
||||
* FarmVille 2 Country Escape
|
||||
* Flipboard
|
||||
* Fresh Paint
|
||||
* Get started
|
||||
* iHeartRadio
|
||||
* King apps
|
||||
* Maps
|
||||
* March of Empires
|
||||
* Messaging
|
||||
* Microsoft Office Hub
|
||||
* Microsoft Solitaire Collection
|
||||
* Microsoft Sticky Notes
|
||||
* Minecraft
|
||||
* NYT Crossword
|
||||
* Netflix
|
||||
* Network Speed Test
|
||||
* Office Sway
|
||||
* OneConnect
|
||||
* OneNote
|
||||
* Pandora
|
||||
* People
|
||||
* Phone
|
||||
* Phototastic Collage
|
||||
* PicsArt-PhotoStudio
|
||||
* PowerBI
|
||||
* Royal Revolt 2
|
||||
* Shazam
|
||||
* Skype for Desktop
|
||||
* SoundRecorder
|
||||
* TuneInRadio
|
||||
* Twitter
|
||||
* Windows Feedback
|
||||
* Windows Feedback Hub
|
||||
* Windows Reading List
|
||||
* Windows communications apps
|
||||
* Xbox Game CallableUI
|
||||
* Xbox Identity Provider
|
||||
* XboxApp
|
||||
* Zune Music
|
||||
* Zune Video
|
||||
[3DBuilder](https://www.microsoft.com/en-us/p/3d-builder/9wzdncrfj3t6),
|
||||
[ActiproSoftware](https://www.microsoft.com/en-us/p/actipro-universal-windows-controls/9wzdncrdlvzp),
|
||||
[Alarms](https://www.microsoft.com/en-us/p/windows-alarms-clock/9wzdncrfj3pr?activetab=pivot:overviewtab),
|
||||
[Appconnector](https://www.microsoft.com/en-us/p/connector/9wzdncrdjmlj?activetab=pivot:overviewtab),
|
||||
[Asphalt8](https://www.microsoft.com/en-us/p/asphalt-8-racing-game-drive-drift-at-real-speed/9wzdncrfj26j?activetab=pivot:overviewtab),
|
||||
[Autodesk SketchBook](https://www.microsoft.com/en-us/p/autodesk-sketchbook/9nblggh4vzw5),
|
||||
[MSN Money](https://www.microsoft.com/en-us/p/msn-money/9wzdncrfhv4v?activetab=pivot:overviewtab),
|
||||
[Food And Drink](https://www.microsoft.com/en-us/p/food-and-drink/9nblggh0jhqg),
|
||||
[Health And Fitness](https://www.microsoft.com/en-us/p/health-fitness-free/9wzdncrcwcdp),
|
||||
[Microsoft News](https://www.microsoft.com/en-us/p/microsoft-news/9wzdncrfhvfw#activetab=pivot:overviewtab),
|
||||
[MSN Sports](https://www.microsoft.com/en-us/p/msn-sports/9wzdncrfhvh4?activetab=pivot:overviewtab),
|
||||
[MSN Travel](https://www.microsoft.com/en-us/p/msn-travel/9wzdncrfj3ft?activetab=pivot:overviewtab),
|
||||
[MSN Weather](https://www.microsoft.com/en-us/p/msn-weather/9wzdncrfj3q2?activetab=pivot:overviewtab),
|
||||
BioEnrollment,
|
||||
[Windows Camera](https://www.microsoft.com/en-us/p/windows-camera/9wzdncrfjbbg#activetab=pivot:overviewtab),
|
||||
CandyCrush,
|
||||
CandyCrushSoda,
|
||||
Caesars Slots Free Casino,
|
||||
ContactSupport,
|
||||
CyberLink MediaSuite Essentials,
|
||||
DrawboardPDF,
|
||||
Duolingo,
|
||||
EclipseManager,
|
||||
Facebook,
|
||||
FarmVille 2 Country Escape,
|
||||
Flipboard,
|
||||
Fresh Paint,
|
||||
Get started,
|
||||
iHeartRadio,
|
||||
King apps,
|
||||
Maps,
|
||||
March of Empires,
|
||||
Messaging,
|
||||
Microsoft Office Hub,
|
||||
Microsoft Solitaire Collection,
|
||||
Microsoft Sticky Notes,
|
||||
Minecraft,
|
||||
Netflix,
|
||||
Network Speed Test,
|
||||
NYT Crossword,
|
||||
Office Sway,
|
||||
OneNote,
|
||||
OneConnect,
|
||||
Pandora,
|
||||
People,
|
||||
Phone,
|
||||
Phototastic Collage,
|
||||
PicsArt-PhotoStudio,
|
||||
PowerBI,
|
||||
Royal Revolt 2,
|
||||
Shazam,
|
||||
Skype for Desktop,
|
||||
SoundRecorder,
|
||||
TuneInRadio,
|
||||
Twitter,
|
||||
Windows communications apps,
|
||||
Windows Feedback,
|
||||
Windows Feedback Hub,
|
||||
Windows Reading List,
|
||||
XboxApp,
|
||||
Xbox Game CallableUI,
|
||||
Xbox Identity Provider,
|
||||
Zune Music,
|
||||
Zune Video.
|
||||
|
||||
# Quick Download Link
|
||||
## Quick download link
|
||||
|
||||
`iex ((New-Object System.Net.WebClient).DownloadString('https://git.io/debloat'))`
|
||||
`iwr -useb https://git.io/debloat|iex`
|
||||
|
||||
# Refactoring requiered
|
||||
The code needs a whole refactoring. Many functions are doubled thru all the different execude-methods. That makes it even harder to add new functionallity.
|
||||
There should also be only one start script, preffered in PowerShell instead of Batch. Start different modes by using different parameters.
|
||||
Additionally the individual scripts should end on `.ps1`.
|
||||
## Allowlist and Blocklist
|
||||
There may be some confusion, but when using the Allowlist/Blocklist, the checkmark means it is on the blocklist, and that it will be removed.
|
||||
|
||||
# Credits
|
||||
## Credits
|
||||
|
||||
Thank you to a60wattfish, abulgatz, Damian, Norrodar, Vikingat-RAGE, xsisbest and Reddit user /u/GavinEke for some of the suggestions and fixes that I have placed into my scripts. You all have done a fantastic job!
|
||||
Thank you to [a60wattfish](https://github.com/a60wattfish), [abulgatz](abulgatz), [xsisbest](https://github.com/xsisbest), [Damian](https://github.com/Damian), [Vikingat-RAGE](https://github.com/Vikingat-RAGE), Reddit user [/u/GavinEke](https://github.com/GavinEke), and all of the contributors (https://github.com/Sycnex/Windows10Debloater/graphs/contributors) for the suggestions, code, changes, and fixes that you have all graciously worked hard on and shared! You all have done a fantastic job!
|
||||
|
|
|
@ -667,15 +667,64 @@ Function UninstallOneDrive {
|
|||
}
|
||||
|
||||
Function UnpinStart {
|
||||
#https://superuser.com/questions/1068382/how-to-remove-all-the-tiles-in-the-windows-10-start-menu
|
||||
#Unpins all tiles from the Start Menu
|
||||
Write-Host "Unpinning all tiles from the start menu"
|
||||
(New-Object -Com Shell.Application).
|
||||
NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').
|
||||
Items() |
|
||||
% { $_.Verbs() } |
|
||||
? {$_.Name -match 'Un.*pin from Start'} |
|
||||
% {$_.DoIt()}
|
||||
# https://superuser.com/a/1442733
|
||||
#Requires -RunAsAdministrator
|
||||
|
||||
$START_MENU_LAYOUT = @"
|
||||
<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
|
||||
<LayoutOptions StartTileGroupCellWidth="6" />
|
||||
<DefaultLayoutOverride>
|
||||
<StartLayoutCollection>
|
||||
<defaultlayout:StartLayout GroupCellWidth="6" />
|
||||
</StartLayoutCollection>
|
||||
</DefaultLayoutOverride>
|
||||
</LayoutModificationTemplate>
|
||||
"@
|
||||
|
||||
$layoutFile="C:\Windows\StartMenuLayout.xml"
|
||||
|
||||
#Delete layout file if it already exists
|
||||
If(Test-Path $layoutFile)
|
||||
{
|
||||
Remove-Item $layoutFile
|
||||
}
|
||||
|
||||
#Creates the blank layout file
|
||||
$START_MENU_LAYOUT | Out-File $layoutFile -Encoding ASCII
|
||||
|
||||
$regAliases = @("HKLM", "HKCU")
|
||||
|
||||
#Assign the start layout and force it to apply with "LockedStartLayout" at both the machine and user level
|
||||
foreach ($regAlias in $regAliases){
|
||||
$basePath = $regAlias + ":\SOFTWARE\Policies\Microsoft\Windows"
|
||||
$keyPath = $basePath + "\Explorer"
|
||||
IF(!(Test-Path -Path $keyPath)) {
|
||||
New-Item -Path $basePath -Name "Explorer"
|
||||
}
|
||||
Set-ItemProperty -Path $keyPath -Name "LockedStartLayout" -Value 1
|
||||
Set-ItemProperty -Path $keyPath -Name "StartLayoutFile" -Value $layoutFile
|
||||
}
|
||||
|
||||
#Restart Explorer, open the start menu (necessary to load the new layout), and give it a few seconds to process
|
||||
Stop-Process -name explorer
|
||||
Start-Sleep -s 5
|
||||
$wshell = New-Object -ComObject wscript.shell; $wshell.SendKeys('^{ESCAPE}')
|
||||
Start-Sleep -s 5
|
||||
|
||||
#Enable the ability to pin items again by disabling "LockedStartLayout"
|
||||
foreach ($regAlias in $regAliases){
|
||||
$basePath = $regAlias + ":\SOFTWARE\Policies\Microsoft\Windows"
|
||||
$keyPath = $basePath + "\Explorer"
|
||||
Set-ItemProperty -Path $keyPath -Name "LockedStartLayout" -Value 0
|
||||
}
|
||||
|
||||
#Restart Explorer and delete the layout file
|
||||
Stop-Process -name explorer
|
||||
|
||||
# Uncomment the next line to make clean start menu default for all new users
|
||||
#Import-StartLayout -LayoutPath $layoutFile -MountPath $env:SystemDrive\
|
||||
|
||||
Remove-Item $layoutFile
|
||||
}
|
||||
|
||||
Function Remove3dObjects {
|
||||
|
|
|
@ -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.TopMost = $false
|
||||
$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 = "Windows10Debloader"
|
||||
$Form.TopMost = $false
|
||||
$Form.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#252525")
|
||||
|
||||
$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'
|
||||
$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)
|
||||
|
||||
$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'
|
||||
$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)
|
||||
|
||||
$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'
|
||||
$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)
|
||||
|
||||
$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'
|
||||
$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)
|
||||
|
||||
$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'
|
||||
$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)
|
||||
|
||||
$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'
|
||||
$Debloat = New-Object system.Windows.Forms.Label
|
||||
$Debloat.text = "DEBLOAT OPTIONS"
|
||||
$Debloat.AutoSize = $true
|
||||
$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")
|
||||
|
||||
$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'
|
||||
$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")
|
||||
|
||||
$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'
|
||||
$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")
|
||||
|
||||
$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'
|
||||
$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")
|
||||
|
||||
$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'
|
||||
$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")
|
||||
|
||||
$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'
|
||||
$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")
|
||||
|
||||
$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'
|
||||
$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")
|
||||
|
||||
$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'
|
||||
$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")
|
||||
|
||||
$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'
|
||||
$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")
|
||||
|
||||
$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'
|
||||
$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")
|
||||
|
||||
#$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'
|
||||
$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")
|
||||
|
||||
$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'
|
||||
$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")
|
||||
|
||||
$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'
|
||||
$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")
|
||||
|
||||
$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'
|
||||
$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")
|
||||
|
||||
$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")
|
||||
|
||||
$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")
|
||||
|
||||
$Form.controls.AddRange(@($Debloat, $CustomizeBlacklists, $RemoveAllBloatware, $RemoveBlacklist, $Label1, $RevertChange, $Label2, $DisableCortana, $EnableCortana, $StopEdgePDFTakeover, $EnableEdgePDFTakeover, $DisableTelemetry, $RemoveRegkeys, $UnpinStartMenuTiles, $RemoveOnedrive, $FixWhitelist, $RemoveBloatNoBlacklist, $InstallNet35, $EnableDarkMode, $DisableDarkMode))
|
||||
$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")
|
||||
|
||||
$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")
|
||||
|
||||
$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")
|
||||
|
||||
$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(@($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,24 +489,44 @@ Else {
|
|||
Start-Transcript -OutputDirectory "${DebloatFolder}"
|
||||
|
||||
#region gui events {
|
||||
$CustomizeBlacklists.Add_Click( {
|
||||
$CustomizeForm = New-Object System.Windows.Forms.Form
|
||||
$CustomizeForm.ClientSize = '600,400'
|
||||
$CustomizeForm.Text = "Customize Whitelist and Blacklist"
|
||||
$CustomizeForm.TopMost = $false
|
||||
$CustomizeForm.AutoScroll = $true
|
||||
$CustomizeBlacklist.Add_Click( {
|
||||
$CustomizeForm = New-Object System.Windows.Forms.Form
|
||||
$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 = $false
|
||||
$CustomizeForm.BackColor = [System.Drawing.ColorTranslator]::FromHtml("#252525")
|
||||
|
||||
$SaveList = New-Object System.Windows.Forms.Button
|
||||
$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)
|
||||
$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.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'
|
||||
|
||||
'$global:WhiteListedApps = @(' | Out-File -FilePath $PSScriptRoot\custom-lists.ps1 -Encoding utf8
|
||||
@($CustomizeForm.controls) | ForEach {
|
||||
@($ListPanel.controls) | ForEach {
|
||||
if ($_ -is [System.Windows.Forms.CheckBox] -and $_.Enabled -and !$_.Checked) {
|
||||
" ""$( $_.Text )""" | Out-File -FilePath $PSScriptRoot\custom-lists.ps1 -Append -Encoding utf8
|
||||
}
|
||||
|
@ -396,7 +534,7 @@ $CustomizeBlacklists.Add_Click( {
|
|||
')' | Out-File -FilePath $PSScriptRoot\custom-lists.ps1 -Append -Encoding utf8
|
||||
|
||||
'$global:Bloatware = @(' | Out-File -FilePath $PSScriptRoot\custom-lists.ps1 -Append -Encoding utf8
|
||||
@($CustomizeForm.controls) | ForEach {
|
||||
@($ListPanel.controls) | ForEach {
|
||||
if ($_ -is [System.Windows.Forms.CheckBox] -and $_.Enabled -and $_.Checked) {
|
||||
" ""$($_.Text)""" | Out-File -FilePath $PSScriptRoot\custom-lists.ps1 -Append -Encoding utf8
|
||||
}
|
||||
|
@ -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"
|
||||
|
@ -788,7 +933,7 @@ $RemoveAllBloatware.Add_Click( {
|
|||
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.
|
||||
|
||||
|
@ -915,7 +1060,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"
|
||||
|
|
|
@ -176,7 +176,7 @@ Function Protect-Privacy {
|
|||
Write-Output "Removing CloudStore from registry if it exists"
|
||||
$CloudStore = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\CloudStore'
|
||||
If (Test-Path $CloudStore) {
|
||||
Stop-Process Explorer.exe -Force
|
||||
Stop-Process -Name explorer -Force
|
||||
Remove-Item $CloudStore -Recurse -Force
|
||||
Start-Process Explorer.exe -Wait
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue