mirror of
https://github.com/Sycnex/Windows10Debloater.git
synced 2024-11-24 11:45:29 +00:00
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
|
# https://superuser.com/a/1442733
|
||||||
#Unpins all tiles from the Start Menu
|
#Requires -RunAsAdministrator
|
||||||
Write-Output "Unpinning all tiles from the start menu"
|
|
||||||
(New-Object -Com Shell.Application).
|
$START_MENU_LAYOUT = @"
|
||||||
NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').
|
<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">
|
||||||
Items() |
|
<LayoutOptions StartTileGroupCellWidth="6" />
|
||||||
%{ $_.Verbs() } |
|
<DefaultLayoutOverride>
|
||||||
?{$_.Name -match 'Un.*pin from Start'} |
|
<StartLayoutCollection>
|
||||||
%{$_.DoIt()}
|
<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
|
# 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:
|
## Donate a cup of coffee
|
||||||
* with GUI (**recommended**)
|
<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>
|
||||||
* Interactive (Commandline)
|
|
||||||
* SysPrep (Silence)
|
|
||||||
|
|
||||||
The GUI-Method offers you a simple GUI where you just select your tasks of choice.
|
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)
|
||||||
The Interactive-Method guides you thru all the options - in the console.
|
|
||||||
The SysPrep-Method, is a complete silence way.
|
|
||||||
|
|
||||||
|
## 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.
|
## How To Run the Windows10Debloater.ps1 and the Windows10DebloaterGUI.ps1 files
|
||||||
2. Once extracted, start you favorite method by using one of the following batch-files:
|
|
||||||
|
|
||||||
* Start_GUI.bat (**recommended**)
|
There are different methods of running the PowerShell script. The methods are as follows:
|
||||||
* Start_NOGUI.bat (Interactive-Method)
|
|
||||||
* Start_SysPrep.bat (Silence)
|
|
||||||
|
|
||||||
|
### 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.
|
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.
|
- **`-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.
|
|
||||||
|
|
||||||
|
- **`-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.
|
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,
|
||||||
* EclipseManager,
|
ActiproSoftwareLLC,
|
||||||
* Microsoft.PPIProjection,
|
Microsoft.PPIProjection,
|
||||||
* Microsoft.XboxGameCallableUI
|
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.
|
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
|
Debloat,
|
||||||
* Protect-Privacy
|
Remove-Keys,
|
||||||
* Remove-Keys
|
Protect-Privacy,
|
||||||
* Stop-EdgePDF (If chosen)
|
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 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
|
XblGameSaveTaskLogon,
|
||||||
* DmClient
|
XblGameSaveTask,
|
||||||
* UsbCeip
|
Consolidator,
|
||||||
* XblGameSaveTask
|
UsbCeip,
|
||||||
* XblGameSaveTaskLogon
|
DmClient
|
||||||
|
|
||||||
These scheduled tasks that are disabled have absolutely no impact on the function of the OS.
|
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
|
[3DBuilder](https://www.microsoft.com/en-us/p/3d-builder/9wzdncrfj3t6),
|
||||||
* ActiproSoftware
|
[ActiproSoftware](https://www.microsoft.com/en-us/p/actipro-universal-windows-controls/9wzdncrdlvzp),
|
||||||
* Alarms
|
[Alarms](https://www.microsoft.com/en-us/p/windows-alarms-clock/9wzdncrfj3pr?activetab=pivot:overviewtab),
|
||||||
* Appconnector
|
[Appconnector](https://www.microsoft.com/en-us/p/connector/9wzdncrdjmlj?activetab=pivot:overviewtab),
|
||||||
* Asphalt8
|
[Asphalt8](https://www.microsoft.com/en-us/p/asphalt-8-racing-game-drive-drift-at-real-speed/9wzdncrfj26j?activetab=pivot:overviewtab),
|
||||||
* Autodesk SketchBook
|
[Autodesk SketchBook](https://www.microsoft.com/en-us/p/autodesk-sketchbook/9nblggh4vzw5),
|
||||||
* Bing Finance
|
[MSN Money](https://www.microsoft.com/en-us/p/msn-money/9wzdncrfhv4v?activetab=pivot:overviewtab),
|
||||||
* Bing Food And Drink
|
[Food And Drink](https://www.microsoft.com/en-us/p/food-and-drink/9nblggh0jhqg),
|
||||||
* Bing Health And Fitness
|
[Health And Fitness](https://www.microsoft.com/en-us/p/health-fitness-free/9wzdncrcwcdp),
|
||||||
* Bing News
|
[Microsoft News](https://www.microsoft.com/en-us/p/microsoft-news/9wzdncrfhvfw#activetab=pivot:overviewtab),
|
||||||
* Bing Sports
|
[MSN Sports](https://www.microsoft.com/en-us/p/msn-sports/9wzdncrfhvh4?activetab=pivot:overviewtab),
|
||||||
* Bing Travel
|
[MSN Travel](https://www.microsoft.com/en-us/p/msn-travel/9wzdncrfj3ft?activetab=pivot:overviewtab),
|
||||||
* Bing Weather
|
[MSN Weather](https://www.microsoft.com/en-us/p/msn-weather/9wzdncrfj3q2?activetab=pivot:overviewtab),
|
||||||
* BioEnrollment
|
BioEnrollment,
|
||||||
* Caesars Slots Free Casino
|
[Windows Camera](https://www.microsoft.com/en-us/p/windows-camera/9wzdncrfjbbg#activetab=pivot:overviewtab),
|
||||||
* Camera
|
CandyCrush,
|
||||||
* CandyCrush
|
CandyCrushSoda,
|
||||||
* CandyCrushSoda
|
Caesars Slots Free Casino,
|
||||||
* ContactSupport
|
ContactSupport,
|
||||||
* CyberLink MediaSuite Essentials
|
CyberLink MediaSuite Essentials,
|
||||||
* DrawboardPDF
|
DrawboardPDF,
|
||||||
* Duolingo
|
Duolingo,
|
||||||
* EclipseManager
|
EclipseManager,
|
||||||
* Facebook
|
Facebook,
|
||||||
* FarmVille 2 Country Escape
|
FarmVille 2 Country Escape,
|
||||||
* Flipboard
|
Flipboard,
|
||||||
* Fresh Paint
|
Fresh Paint,
|
||||||
* Get started
|
Get started,
|
||||||
* iHeartRadio
|
iHeartRadio,
|
||||||
* King apps
|
King apps,
|
||||||
* Maps
|
Maps,
|
||||||
* March of Empires
|
March of Empires,
|
||||||
* Messaging
|
Messaging,
|
||||||
* Microsoft Office Hub
|
Microsoft Office Hub,
|
||||||
* Microsoft Solitaire Collection
|
Microsoft Solitaire Collection,
|
||||||
* Microsoft Sticky Notes
|
Microsoft Sticky Notes,
|
||||||
* Minecraft
|
Minecraft,
|
||||||
* NYT Crossword
|
Netflix,
|
||||||
* Netflix
|
Network Speed Test,
|
||||||
* Network Speed Test
|
NYT Crossword,
|
||||||
* Office Sway
|
Office Sway,
|
||||||
* OneConnect
|
OneNote,
|
||||||
* OneNote
|
OneConnect,
|
||||||
* Pandora
|
Pandora,
|
||||||
* People
|
People,
|
||||||
* Phone
|
Phone,
|
||||||
* Phototastic Collage
|
Phototastic Collage,
|
||||||
* PicsArt-PhotoStudio
|
PicsArt-PhotoStudio,
|
||||||
* PowerBI
|
PowerBI,
|
||||||
* Royal Revolt 2
|
Royal Revolt 2,
|
||||||
* Shazam
|
Shazam,
|
||||||
* Skype for Desktop
|
Skype for Desktop,
|
||||||
* SoundRecorder
|
SoundRecorder,
|
||||||
* TuneInRadio
|
TuneInRadio,
|
||||||
* Twitter
|
Twitter,
|
||||||
* Windows Feedback
|
Windows communications apps,
|
||||||
* Windows Feedback Hub
|
Windows Feedback,
|
||||||
* Windows Reading List
|
Windows Feedback Hub,
|
||||||
* Windows communications apps
|
Windows Reading List,
|
||||||
* Xbox Game CallableUI
|
XboxApp,
|
||||||
* Xbox Identity Provider
|
Xbox Game CallableUI,
|
||||||
* XboxApp
|
Xbox Identity Provider,
|
||||||
* Zune Music
|
Zune Music,
|
||||||
* Zune Video
|
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
|
## Allowlist and Blocklist
|
||||||
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 may be some confusion, but when using the Allowlist/Blocklist, the checkmark means it is on the blocklist, and that it will be removed.
|
||||||
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`.
|
|
||||||
|
|
||||||
# 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 {
|
Function UnpinStart {
|
||||||
#https://superuser.com/questions/1068382/how-to-remove-all-the-tiles-in-the-windows-10-start-menu
|
# https://superuser.com/a/1442733
|
||||||
#Unpins all tiles from the Start Menu
|
#Requires -RunAsAdministrator
|
||||||
Write-Host "Unpinning all tiles from the start menu"
|
|
||||||
(New-Object -Com Shell.Application).
|
$START_MENU_LAYOUT = @"
|
||||||
NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').
|
<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">
|
||||||
Items() |
|
<LayoutOptions StartTileGroupCellWidth="6" />
|
||||||
% { $_.Verbs() } |
|
<DefaultLayoutOverride>
|
||||||
? {$_.Name -match 'Un.*pin from Start'} |
|
<StartLayoutCollection>
|
||||||
% {$_.DoIt()}
|
<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 {
|
Function Remove3dObjects {
|
||||||
|
@ -210,152 +210,270 @@ $global:WhiteListedAppsRegex = $global:WhiteListedApps -join '|'
|
|||||||
Add-Type -AssemblyName System.Windows.Forms
|
Add-Type -AssemblyName System.Windows.Forms
|
||||||
[System.Windows.Forms.Application]::EnableVisualStyles()
|
[System.Windows.Forms.Application]::EnableVisualStyles()
|
||||||
|
|
||||||
#region begin GUI
|
$Form = New-Object system.Windows.Forms.Form
|
||||||
$Form = New-Object System.Windows.Forms.Form
|
$Form.ClientSize = New-Object System.Drawing.Point(500,570)
|
||||||
$Form.ClientSize = '800,500'
|
$Form.StartPosition = 'CenterScreen'
|
||||||
$Form.Text = "Windows10Debloater"
|
$Form.FormBorderStyle = 'FixedSingle'
|
||||||
$Form.TopMost = $false
|
$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
|
$DebloatPanel = New-Object system.Windows.Forms.Panel
|
||||||
$Debloat.Text = "Debloat Options"
|
$DebloatPanel.height = 160
|
||||||
$Debloat.AutoSize = $true
|
$DebloatPanel.width = 480
|
||||||
$Debloat.Width = 25
|
$DebloatPanel.Anchor = 'top,right,left'
|
||||||
$Debloat.Height = 10
|
$DebloatPanel.location = New-Object System.Drawing.Point(10,10)
|
||||||
$Debloat.Location = New-Object System.Drawing.Point(9, 8)
|
|
||||||
$Debloat.Font = 'Microsoft Sans Serif,12,style=Bold,Underline'
|
|
||||||
|
|
||||||
|
$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
|
$CortanaPanel = New-Object system.Windows.Forms.Panel
|
||||||
$CustomizeBlacklists.Text = "Customize Blacklist"
|
$CortanaPanel.height = 120
|
||||||
$CustomizeBlacklists.Width = 140
|
$CortanaPanel.width = 153
|
||||||
$CustomizeBlacklists.Height = 40
|
$CortanaPanel.Anchor = 'top,right,left'
|
||||||
$CustomizeBlacklists.Location = New-Object System.Drawing.Point(9, 32)
|
$CortanaPanel.location = New-Object System.Drawing.Point(10,270)
|
||||||
$CustomizeBlacklists.Font = 'Microsoft Sans Serif,10'
|
|
||||||
|
|
||||||
$RemoveAllBloatware = New-Object System.Windows.Forms.Button
|
$EdgePanel = New-Object system.Windows.Forms.Panel
|
||||||
$RemoveAllBloatware.Text = "Remove All Bloatware"
|
$EdgePanel.height = 120
|
||||||
$RemoveAllBloatware.Width = 142
|
$EdgePanel.width = 154
|
||||||
$RemoveAllBloatware.Height = 40
|
$EdgePanel.Anchor = 'top,right,left'
|
||||||
$RemoveAllBloatware.Location = New-Object System.Drawing.Point(8, 79)
|
$EdgePanel.location = New-Object System.Drawing.Point(173,270)
|
||||||
$RemoveAllBloatware.Font = 'Microsoft Sans Serif,10'
|
|
||||||
|
|
||||||
$RemoveBlacklist = New-Object System.Windows.Forms.Button
|
$DarkThemePanel = New-Object system.Windows.Forms.Panel
|
||||||
$RemoveBlacklist.Text = "Remove Bloatware With Customized Blacklist"
|
$DarkThemePanel.height = 120
|
||||||
$RemoveBlacklist.Width = 205
|
$DarkThemePanel.width = 153
|
||||||
$RemoveBlacklist.Height = 37
|
$DarkThemePanel.Anchor = 'top,right,left'
|
||||||
$RemoveBlacklist.Location = New-Object System.Drawing.Point(9, 124)
|
$DarkThemePanel.location = New-Object System.Drawing.Point(337,270)
|
||||||
$RemoveBlacklist.Font = 'Microsoft Sans Serif,10'
|
|
||||||
|
|
||||||
$Label1 = New-Object System.Windows.Forms.Label
|
$OtherPanel = New-Object system.Windows.Forms.Panel
|
||||||
$Label1.Text = "Revert Registry Changes"
|
$OtherPanel.height = 160
|
||||||
$Label1.AutoSize = $true
|
$OtherPanel.width = 480
|
||||||
$Label1.Width = 25
|
$OtherPanel.Anchor = 'top,right,left'
|
||||||
$Label1.Height = 10
|
$OtherPanel.location = New-Object System.Drawing.Point(10,400)
|
||||||
$Label1.Location = New-Object System.Drawing.Point(254, 7)
|
|
||||||
$Label1.Font = 'Microsoft Sans Serif,12,style=Bold,Underline'
|
|
||||||
|
|
||||||
$RevertChange = New-Object System.Windows.Forms.Button
|
$Debloat = New-Object system.Windows.Forms.Label
|
||||||
$RevertChange.Text = "Revert Registry Changes"
|
$Debloat.text = "DEBLOAT OPTIONS"
|
||||||
$RevertChange.Width = 113
|
$Debloat.AutoSize = $true
|
||||||
$RevertChange.Height = 36
|
$Debloat.width = 457
|
||||||
$RevertChange.Location = New-Object System.Drawing.Point(254, 32)
|
$Debloat.height = 142
|
||||||
$RevertChange.Font = 'Microsoft Sans Serif,10'
|
$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
|
$CustomizeBlacklist = New-Object system.Windows.Forms.Button
|
||||||
$Label2.Text = "Optional Changes/Fixes"
|
$CustomizeBlacklist.FlatStyle = 'Flat'
|
||||||
$Label2.AutoSize = $true
|
$CustomizeBlacklist.text = "CUSTOMISE BLACKLIST"
|
||||||
$Label2.Width = 25
|
$CustomizeBlacklist.width = 460
|
||||||
$Label2.Height = 10
|
$CustomizeBlacklist.height = 30
|
||||||
$Label2.Location = New-Object System.Drawing.Point(9, 193)
|
$CustomizeBlacklist.Anchor = 'top,right,left'
|
||||||
$Label2.Font = 'Microsoft Sans Serif,12,style=Bold,Underline'
|
$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
|
$RemoveAllBloatware = New-Object system.Windows.Forms.Button
|
||||||
$DisableCortana.Text = "Disable Cortana"
|
$RemoveAllBloatware.FlatStyle = 'Flat'
|
||||||
$DisableCortana.Width = 111
|
$RemoveAllBloatware.text = "REMOVE ALL BLOATWARE"
|
||||||
$DisableCortana.Height = 36
|
$RemoveAllBloatware.width = 460
|
||||||
$DisableCortana.Location = New-Object System.Drawing.Point(9, 217)
|
$RemoveAllBloatware.height = 30
|
||||||
$DisableCortana.Font = 'Microsoft Sans Serif,10'
|
$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
|
$RemoveBlacklistedBloatware = New-Object system.Windows.Forms.Button
|
||||||
$EnableCortana.Text = "Enable Cortana"
|
$RemoveBlacklistedBloatware.FlatStyle = 'Flat'
|
||||||
$EnableCortana.Width = 112
|
$RemoveBlacklistedBloatware.text = "REMOVE BLOATWARE WITH CUSTOM BLACKLIST"
|
||||||
$EnableCortana.Height = 36
|
$RemoveBlacklistedBloatware.width = 460
|
||||||
$EnableCortana.Location = New-Object System.Drawing.Point(9, 260)
|
$RemoveBlacklistedBloatware.height = 30
|
||||||
$EnableCortana.Font = 'Microsoft Sans Serif,10'
|
$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
|
$Registry = New-Object system.Windows.Forms.Label
|
||||||
$StopEdgePDFTakeover.Text = "Stop Edge PDF Takeover"
|
$Registry.text = "REGISTRY CHANGES"
|
||||||
$StopEdgePDFTakeover.Width = 175
|
$Registry.AutoSize = $true
|
||||||
$StopEdgePDFTakeover.Height = 35
|
$Registry.width = 457
|
||||||
$StopEdgePDFTakeover.Location = New-Object System.Drawing.Point(155, 217)
|
$Registry.height = 142
|
||||||
$StopEdgePDFTakeover.Font = 'Microsoft Sans Serif,10'
|
$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
|
$RevertChanges = New-Object system.Windows.Forms.Button
|
||||||
$EnableEdgePDFTakeover.Text = "Enable Edge PDF Takeover"
|
$RevertChanges.FlatStyle = 'Flat'
|
||||||
$EnableEdgePDFTakeover.Width = 185
|
$RevertChanges.text = "REVERT REGISTRY CHANGES"
|
||||||
$EnableEdgePDFTakeover.Height = 35
|
$RevertChanges.width = 460
|
||||||
$EnableEdgePDFTakeover.Location = New-Object System.Drawing.Point(155, 260)
|
$RevertChanges.height = 30
|
||||||
$EnableEdgePDFTakeover.Font = 'Microsoft Sans Serif,10'
|
$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
|
$Cortana = New-Object system.Windows.Forms.Label
|
||||||
$DisableTelemetry.Text = "Disable Telemetry/Tasks"
|
$Cortana.text = "CORTANA"
|
||||||
$DisableTelemetry.Width = 152
|
$Cortana.AutoSize = $true
|
||||||
$DisableTelemetry.Height = 35
|
$Cortana.width = 457
|
||||||
$DisableTelemetry.Location = New-Object System.Drawing.Point(365, 260)
|
$Cortana.height = 142
|
||||||
$DisableTelemetry.Font = 'Microsoft Sans Serif,10'
|
$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
|
$EnableCortana = New-Object system.Windows.Forms.Button
|
||||||
$RemoveRegkeys.Text = "Remove Bloatware Regkeys"
|
$EnableCortana.FlatStyle = 'Flat'
|
||||||
$RemoveRegkeys.Width = 188
|
$EnableCortana.text = "ENABLE"
|
||||||
$RemoveRegkeys.Height = 35
|
$EnableCortana.width = 133
|
||||||
$RemoveRegkeys.Location = New-Object System.Drawing.Point(540, 260)
|
$EnableCortana.height = 30
|
||||||
$RemoveRegkeys.Font = 'Microsoft Sans Serif,10'
|
$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
|
$DisableCortana = New-Object system.Windows.Forms.Button
|
||||||
$UnpinStartMenuTiles.Text = "Unpin Tiles From Start Menu"
|
$DisableCortana.FlatStyle = 'Flat'
|
||||||
$UnpinStartMenuTiles.Width = 190
|
$DisableCortana.text = "DISABLE"
|
||||||
$UnpinStartMenuTiles.Height = 35
|
$DisableCortana.width = 133
|
||||||
$UnpinStartMenuTiles.Location = New-Object System.Drawing.Point(540, 217)
|
$DisableCortana.height = 30
|
||||||
$UnpinStartMenuTiles.Font = 'Microsoft Sans Serif,10'
|
$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
|
$Edge = New-Object system.Windows.Forms.Label
|
||||||
$RemoveOnedrive.Text = "Uninstall OneDrive"
|
$Edge.text = "EDGE PDF"
|
||||||
$RemoveOnedrive.Width = 152
|
$Edge.AutoSize = $true
|
||||||
$RemoveOnedrive.Height = 35
|
$Edge.width = 457
|
||||||
$RemoveOnedrive.Location = New-Object System.Drawing.Point(365, 217)
|
$Edge.height = 142
|
||||||
$RemoveOnedrive.Font = 'Microsoft Sans Serif,10'
|
$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
|
$EnableEdgePDFTakeover = New-Object system.Windows.Forms.Button
|
||||||
#$FixWhitelist.Text = "Fix Whitelisted Apps"
|
$EnableEdgePDFTakeover.FlatStyle = 'Flat'
|
||||||
#$FixWhitelist.Width = 130
|
$EnableEdgePDFTakeover.text = "ENABLE"
|
||||||
#$FixWhitelist.Height = 37
|
$EnableEdgePDFTakeover.width = 134
|
||||||
#$FixWhitelist.Location = New-Object System.Drawing.Point(254, 74)
|
$EnableEdgePDFTakeover.height = 30
|
||||||
#$FixWhitelist.Font = 'Microsoft Sans Serif,10'
|
$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
|
$DisableEdgePDFTakeover = New-Object system.Windows.Forms.Button
|
||||||
$InstallNet35.Text = "Install .NET v3.5"
|
$DisableEdgePDFTakeover.FlatStyle = 'Flat'
|
||||||
$InstallNet35.Width = 152
|
$DisableEdgePDFTakeover.text = "DISABLE"
|
||||||
$InstallNet35.Height = 39
|
$DisableEdgePDFTakeover.width = 134
|
||||||
$InstallNet35.Location = New-Object System.Drawing.Point(169, 335)
|
$DisableEdgePDFTakeover.height = 30
|
||||||
$InstallNet35.Font = 'Microsoft Sans Serif,10'
|
$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
|
$Theme = New-Object system.Windows.Forms.Label
|
||||||
$EnableDarkMode.Text = "Enable Dark Mode"
|
$Theme.text = "DARK THEME"
|
||||||
$EnableDarkMode.Width = 152
|
$Theme.AutoSize = $true
|
||||||
$EnableDarkMode.Height = 39
|
$Theme.width = 457
|
||||||
$EnableDarkMode.Location = New-Object System.Drawing.Point(9, 335)
|
$Theme.height = 142
|
||||||
$EnableDarkMode.Font = 'Microsoft Sans Serif,10'
|
$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
|
$EnableDarkMode = New-Object system.Windows.Forms.Button
|
||||||
$DisableDarkMode.Text = "Disable Dark Mode"
|
$EnableDarkMode.FlatStyle = 'Flat'
|
||||||
$DisableDarkMode.Width = 152
|
$EnableDarkMode.text = "ENABLE"
|
||||||
$DisableDarkMode.Height = 39
|
$EnableDarkMode.width = 133
|
||||||
$DisableDarkMode.Location = New-Object System.Drawing.Point(9, 385)
|
$EnableDarkMode.height = 30
|
||||||
$DisableDarkMode.Font = 'Microsoft Sans Serif,10'
|
$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"
|
$DebloatFolder = "C:\Temp\Windows10Debloater"
|
||||||
If (Test-Path $DebloatFolder) {
|
If (Test-Path $DebloatFolder) {
|
||||||
@ -371,24 +489,44 @@ Else {
|
|||||||
Start-Transcript -OutputDirectory "${DebloatFolder}"
|
Start-Transcript -OutputDirectory "${DebloatFolder}"
|
||||||
|
|
||||||
#region gui events {
|
#region gui events {
|
||||||
$CustomizeBlacklists.Add_Click( {
|
$CustomizeBlacklist.Add_Click( {
|
||||||
$CustomizeForm = New-Object System.Windows.Forms.Form
|
$CustomizeForm = New-Object System.Windows.Forms.Form
|
||||||
$CustomizeForm.ClientSize = '600,400'
|
$CustomizeForm.ClientSize = New-Object System.Drawing.Point(500,570)
|
||||||
$CustomizeForm.Text = "Customize Whitelist and Blacklist"
|
$CustomizeForm.StartPosition = 'CenterScreen'
|
||||||
$CustomizeForm.TopMost = $false
|
$CustomizeForm.FormBorderStyle = 'FixedSingle'
|
||||||
$CustomizeForm.AutoScroll = $true
|
$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
|
$ListPanel = New-Object system.Windows.Forms.Panel
|
||||||
$SaveList.Text = "Save custom Whitelist and Blacklist to custom-lists.ps1"
|
$ListPanel.height = 510
|
||||||
$SaveList.AutoSize = $true
|
$ListPanel.width = 480
|
||||||
$SaveList.Location = New-Object System.Drawing.Point(200, 5)
|
$ListPanel.Anchor = 'top,right,left'
|
||||||
$CustomizeForm.controls.Add($SaveList)
|
$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( {
|
$SaveList.Add_Click( {
|
||||||
$ErrorActionPreference = 'SilentlyContinue'
|
$ErrorActionPreference = 'SilentlyContinue'
|
||||||
|
|
||||||
'$global:WhiteListedApps = @(' | Out-File -FilePath $PSScriptRoot\custom-lists.ps1 -Encoding utf8
|
'$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) {
|
if ($_ -is [System.Windows.Forms.CheckBox] -and $_.Enabled -and !$_.Checked) {
|
||||||
" ""$( $_.Text )""" | Out-File -FilePath $PSScriptRoot\custom-lists.ps1 -Append -Encoding utf8
|
" ""$( $_.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
|
')' | Out-File -FilePath $PSScriptRoot\custom-lists.ps1 -Append -Encoding utf8
|
||||||
|
|
||||||
'$global:Bloatware = @(' | 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) {
|
if ($_ -is [System.Windows.Forms.CheckBox] -and $_.Enabled -and $_.Checked) {
|
||||||
" ""$($_.Text)""" | Out-File -FilePath $PSScriptRoot\custom-lists.ps1 -Append -Encoding utf8
|
" ""$($_.Text)""" | Out-File -FilePath $PSScriptRoot\custom-lists.ps1 -Append -Encoding utf8
|
||||||
}
|
}
|
||||||
@ -421,25 +559,33 @@ $CustomizeBlacklists.Add_Click( {
|
|||||||
[bool] $enabled,
|
[bool] $enabled,
|
||||||
[Parameter(Mandatory)]
|
[Parameter(Mandatory)]
|
||||||
[bool] $checked,
|
[bool] $checked,
|
||||||
|
[Parameter(Mandatory)]
|
||||||
|
[bool] $autocheck,
|
||||||
|
|
||||||
[string] $notes
|
[string] $notes
|
||||||
)
|
)
|
||||||
|
|
||||||
$label = New-Object System.Windows.Forms.Label
|
$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.Text = $notes
|
||||||
$label.Width = 300
|
$label.Font = New-Object System.Drawing.Font('Consolas',8)
|
||||||
|
$label.Width = 150
|
||||||
$label.Height = 16
|
$label.Height = 16
|
||||||
$Label.TextAlign = [System.Drawing.ContentAlignment]::TopRight
|
$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 = New-Object System.Windows.Forms.CheckBox
|
||||||
$Checkbox.Text = $appName
|
$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.Autosize = 1;
|
||||||
$Checkbox.Checked = $checked
|
$Checkbox.Checked = $checked
|
||||||
$Checkbox.Enabled = $enabled
|
$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 $Installed -and $Installed -cmatch $item) { $string += "Installed" }
|
||||||
if ( $null -notmatch $AllUsers -and $AllUsers -cmatch $item) { $string += " AllUsers" }
|
if ( $null -notmatch $AllUsers -and $AllUsers -cmatch $item) { $string += " AllUsers" }
|
||||||
if ( $null -notmatch $Online -and $Online -cmatch $item) { $string += " Online" }
|
if ( $null -notmatch $Online -and $Online -cmatch $item) { $string += " Online" }
|
||||||
$string += " NONREMOVABLE"
|
$string += " NON-REMOVABLE"
|
||||||
AddAppToCustomizeForm $checkboxCounter $item $false $false $string
|
AddAppToCustomizeForm $checkboxCounter $item $true $false $false $string
|
||||||
++$checkboxCounter
|
++$checkboxCounter
|
||||||
}
|
}
|
||||||
ForEach ( $item in $global:WhiteListedApps ) {
|
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 $Installed -and $Installed -cmatch $item) { $string += "Installed" }
|
||||||
if ( $null -notmatch $AllUsers -and $AllUsers -cmatch $item) { $string += " AllUsers" }
|
if ( $null -notmatch $AllUsers -and $AllUsers -cmatch $item) { $string += " AllUsers" }
|
||||||
if ( $null -notmatch $Online -and $Online -cmatch $item) { $string += " Online" }
|
if ( $null -notmatch $Online -and $Online -cmatch $item) { $string += " Online" }
|
||||||
AddAppToCustomizeForm $checkboxCounter $item $true $false $string
|
AddAppToCustomizeForm $checkboxCounter $item $true $false $true $string
|
||||||
++$checkboxCounter
|
++$checkboxCounter
|
||||||
}
|
}
|
||||||
ForEach ( $item in $global:Bloatware ) {
|
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 $Installed -and $Installed -cmatch $item) { $string += "Installed" }
|
||||||
if ( $null -notmatch $AllUsers -and $AllUsers -cmatch $item) { $string += " AllUsers" }
|
if ( $null -notmatch $AllUsers -and $AllUsers -cmatch $item) { $string += " AllUsers" }
|
||||||
if ( $null -notmatch $Online -and $Online -cmatch $item) { $string += " Online" }
|
if ( $null -notmatch $Online -and $Online -cmatch $item) { $string += " Online" }
|
||||||
AddAppToCustomizeForm $checkboxCounter $item $true $true $string
|
AddAppToCustomizeForm $checkboxCounter $item $true $true $true $string
|
||||||
++$checkboxCounter
|
++$checkboxCounter
|
||||||
}
|
}
|
||||||
ForEach ( $item in $AllUsers ) {
|
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 $global:BloatwareRegex -and $item -cmatch $global:BloatwareRegex ) { continue }
|
||||||
if ( $null -notmatch $Installed -and $Installed -cmatch $item) { $string += " Installed" }
|
if ( $null -notmatch $Installed -and $Installed -cmatch $item) { $string += " Installed" }
|
||||||
if ( $null -notmatch $Online -and $Online -cmatch $item) { $string += " Online" }
|
if ( $null -notmatch $Online -and $Online -cmatch $item) { $string += " Online" }
|
||||||
AddAppToCustomizeForm $checkboxCounter $item $true $true $string
|
AddAppToCustomizeForm $checkboxCounter $item $true $true $true $string
|
||||||
++$checkboxCounter
|
++$checkboxCounter
|
||||||
}
|
}
|
||||||
ForEach ( $item in $Installed ) {
|
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 $global:BloatwareRegex -and $item -cmatch $global:BloatwareRegex ) { continue }
|
||||||
if ( $null -notmatch $AllUsers -and $AllUsers -cmatch $item) { continue }
|
if ( $null -notmatch $AllUsers -and $AllUsers -cmatch $item) { continue }
|
||||||
if ( $null -notmatch $Online -and $Online -cmatch $item) { $string += " Online" }
|
if ( $null -notmatch $Online -and $Online -cmatch $item) { $string += " Online" }
|
||||||
AddAppToCustomizeForm $checkboxCounter $item $true $true $string
|
AddAppToCustomizeForm $checkboxCounter $item $true $true $true $string
|
||||||
++$checkboxCounter
|
++$checkboxCounter
|
||||||
}
|
}
|
||||||
ForEach ( $item in $Online ) {
|
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 $global:BloatwareRegex -and $item -cmatch $global:BloatwareRegex ) { continue }
|
||||||
if ( $null -notmatch $Installed -and $Installed -cmatch $item) { continue }
|
if ( $null -notmatch $Installed -and $Installed -cmatch $item) { continue }
|
||||||
if ( $null -notmatch $AllUsers -and $AllUsers -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
|
++$checkboxCounter
|
||||||
}
|
}
|
||||||
[void]$CustomizeForm.ShowDialog()
|
[void]$CustomizeForm.ShowDialog()
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
$RemoveBlacklist.Add_Click( {
|
$RemoveBlacklistedBloatware.Add_Click( {
|
||||||
$ErrorActionPreference = 'SilentlyContinue'
|
$ErrorActionPreference = 'SilentlyContinue'
|
||||||
Function DebloatBlacklist {
|
Function DebloatBlacklist {
|
||||||
Write-Host "Requesting removal of $global:BloatwareRegex"
|
Write-Host "Requesting removal of $global:BloatwareRegex"
|
||||||
@ -788,7 +933,7 @@ $RemoveAllBloatware.Add_Click( {
|
|||||||
Write-Host "Finished all tasks. `n"
|
Write-Host "Finished all tasks. `n"
|
||||||
|
|
||||||
} )
|
} )
|
||||||
$RevertChange.Add_Click( {
|
$RevertChanges.Add_Click( {
|
||||||
$ErrorActionPreference = 'SilentlyContinue'
|
$ErrorActionPreference = 'SilentlyContinue'
|
||||||
#This function will revert the changes you made when running the Start-Debloat function.
|
#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
|
Set-ItemProperty $Cortana3 HarvestContacts -Value 0
|
||||||
Write-Host "Cortana has been disabled."
|
Write-Host "Cortana has been disabled."
|
||||||
})
|
})
|
||||||
$StopEdgePDFTakeover.Add_Click( {
|
$DisableEdgePDFTakeover.Add_Click( {
|
||||||
$ErrorActionPreference = 'SilentlyContinue'
|
$ErrorActionPreference = 'SilentlyContinue'
|
||||||
#Stops edge from taking over as the default .PDF viewer
|
#Stops edge from taking over as the default .PDF viewer
|
||||||
Write-Host "Stopping 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"
|
Write-Output "Removing CloudStore from registry if it exists"
|
||||||
$CloudStore = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\CloudStore'
|
$CloudStore = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\CloudStore'
|
||||||
If (Test-Path $CloudStore) {
|
If (Test-Path $CloudStore) {
|
||||||
Stop-Process Explorer.exe -Force
|
Stop-Process -Name explorer -Force
|
||||||
Remove-Item $CloudStore -Recurse -Force
|
Remove-Item $CloudStore -Recurse -Force
|
||||||
Start-Process Explorer.exe -Wait
|
Start-Process Explorer.exe -Wait
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user