New Functions + Better ReadMe

Reworked the ReadMe.md to make it easier to read (PR #237 by @JimmyCushnie ).
Also added the easy to start batch-files (PR #212 by @Woomy4680-exe ).
Additionally added some individual scripts to deactivate AeroShake, deactivate and delete the "Last Used Files and Folders" and to change the Explorer LaunchTo (Entry Point) to Computer (like in Windows XP).
pull/261/head
Norrodar 4 years ago
parent 78c69a56ba
commit baff27791c

@ -0,0 +1,2 @@
Write-Host "Clear last used files and folders"
Remove-Item %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\*.automaticDestinations-ms -FORCE -ErrorAction SilentlyContinue

@ -0,0 +1,14 @@
$Keys = @(
# Deactivate showing of last used files
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders\{3134ef9c-6b18-4996-ad04-ed5912e00eb5}"
# Deactivate showing of last used folders
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders\{3936E9E4-D92C-4EEE-A85A-BC16D5EA0819}"
)
#This writes the output of each key it is removing and also removes the keys listed above.
ForEach ($Key in $Keys) {
Write-Output "Removing $Key from registry"
Remove-Item $Key -Recurse
}

@ -90,3 +90,29 @@
#Enabling the Diagnostics Tracking Service #Enabling the Diagnostics Tracking Service
Set-Service "DiagTrack" -StartupType Automatic Set-Service "DiagTrack" -StartupType Automatic
Start-Service "DiagTrack" Start-Service "DiagTrack"
# # Re-Enable the showing of last used files and folders (luff)
# Write-Output "Re-enabling keys to show last used files and folders"
# $luffKeys = @(
# "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders\{3134ef9c-6b18-4996-ad04-ed5912e00eb5}"
# "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\HomeFolderDesktop\NameSpace\DelegateFolders\{3936E9E4-D92C-4EEE-A85A-BC16D5EA0819}"
# )
# ForEach ($luffKey in $luffKeys) {
# If (! (Test-Path $lastUsedFiles)) {
# Write-Output "Adding $luffKey to registry"
# New-Item $luffKey
# }
# }
# Write-Output "Re-enabling explorer to show last used files and folders"
# $explorerLastUsed = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer"
# Set-ItemProperty $explorerLastUsed HubMode -Value 0
#
# # Re-Enable AeroShake
# Write-Output "Re-enabling AeroShake"
# $aeroShake = "HKCU:\Software\Policies\Microsoft\Windows\Explorer"
# Set-ItemProperty $aeroShake NoWindowMinimizingShortcuts -Value 0
#
# # Re-Locate Explorer LaunchTo
# Write-Output "Re-Locate the Explorers Launch To (Entry Point)"
# $LaunchTo = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
# Set-ItemProperty $LaunchTo LaunchTo -Value 2

@ -0,0 +1,9 @@
# "This Computer"-Button starts the explorer on the following path:
# LaunchTo Value Description
# 1 Computer (Harddrives, Network, etc.)
# 2 Fast Access
# 3 Downloads (The Download-Folder)
Write-Host "Set Explorers Entry Point"
$LaunchTo = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
Set-ItemProperty $LaunchTo LaunchTo -Value 1

@ -1,175 +1,153 @@
# Windows10Debloater
Script/Utility/Application to debloat Windows 10
# How To Run the Windows10Debloater.ps1 and the Windows10DebloaterGUI.ps1 files
There are different methods of running the PowerShell script. The methods are as follows:
First Method:
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 (or PowerShell ISE) 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: # Windows10Debloater
Script/Utility/Application to debloat, optimize and tweak Windows 10
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`.
To run this with parameters, do the following: # Methods to Run Windows10Debloater
1) Download the .zip file on the main page of the github and extract the .zip file to your desired location There are different methods of running the Windows10Debloater:
2) Once extracted, open PowerShell (or PowerShell ISE) as an Administrator * with GUI (**recommended**)
3) On the prompt, change to the directory where you extracted the files: * Interactive (Commandline)
e.g. - `cd c:\temp` * SysPrep (Silence)
4) Next, to run either script, enter in the following:
e.g. - `.\Windows10SysPrepDebloater.ps1 -Sysprep, -Debloat -Privacy`
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.
# Sysprep, Interactive, and GUI Application
There are now 3 versions of my Windows10Debloater - There is an interactive version, a GUI app version, and a pure silent version. # How to Run Windows10Debloater
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. 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:
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. * Start_GUI.bat (**recommended**)
* Start_NOGUI.bat (Interactive-Method)
* Start_SysPrep.bat (Silence)
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 # 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. 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. The second switch parameter is `-Debloat`, 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. 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.
# 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:
EclipseManager, * ActiproSoftwareLLC,
ActiproSoftwareLLC, * EclipseManager,
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
Remove-Keys, * Protect-Privacy
Protect-Privacy, * Remove-Keys
Stop-EdgePDF (If chosen) * Stop-EdgePDF (If chosen)
The Revert switch choice runs the following functions: **The Revert switch choice runs the following functions:**
Revert-Changes, * Enable-EdgePDF
Enable-EdgePDF * Revert-Changes
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:
XblGameSaveTaskLogon, * Consolidator
XblGameSaveTask, * DmClient
Consolidator, * UsbCeip
UsbCeip, * XblGameSaveTask
DmClient * XblGameSaveTaskLogon
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
ActiproSoftware, * ActiproSoftware
Alarms, * Alarms
Appconnector, * Appconnector
Asphalt8, * Asphalt8
Autodesk SketchBook, * Autodesk SketchBook
Bing Finance, * Bing Finance
Bing Food And Drink, * Bing Food And Drink
Bing Health And Fitness, * Bing Health And Fitness
Bing News, * Bing News
Bing Sports, * Bing Sports
Bing Travel, * Bing Travel
Bing Weather, * Bing Weather
BioEnrollment, * BioEnrollment
Camera, * Caesars Slots Free Casino
CandyCrush, * Camera
CandyCrushSoda, * CandyCrush
Caesars Slots Free Casino, * CandyCrushSoda
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
Netflix, * NYT Crossword
Network Speed Test, * Netflix
NYT Crossword, * Network Speed Test
Office Sway, * Office Sway
OneNote, * OneConnect
OneConnect, * OneNote
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 communications apps, * Windows Feedback
Windows Feedback, * Windows Feedback Hub
Windows Feedback Hub, * Windows Reading List
Windows Reading List, * Windows communications apps
XboxApp, * Xbox Game CallableUI
Xbox Game CallableUI, * Xbox Identity Provider
Xbox Identity Provider, * XboxApp
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'))` `iex ((New-Object System.Net.WebClient).DownloadString('https://git.io/debloat'))`
# 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`.
# Credits # Credits
Thank you to a60wattfish, abulgatz, xsisbest, Damian, Vikingat-RAGE, 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, 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!

@ -704,6 +704,11 @@ Function Restore3dObjects {
} }
} }
#Function DisableLastUsedFilesAndFolders {
# Write-Host = "Disable Explorer to show last used files and folders."
# Invoke-Item (start powershell ((Split-Path $MyInvocation.InvocationName) + "\Individual Scripts\Disable Last Used Files and Folders View.ps1"))
#}
#Interactive prompt Debloat/Revert options #Interactive prompt Debloat/Revert options
$Button = [Windows.MessageBoxButton]::YesNoCancel $Button = [Windows.MessageBoxButton]::YesNoCancel
$ErrorIco = [Windows.MessageBoxImage]::Error $ErrorIco = [Windows.MessageBoxImage]::Error
@ -723,6 +728,11 @@ $Reboot = "For some of the changes to properly take effect it is recommended to
$OneDriveDelete = "Do you want to uninstall One Drive?" $OneDriveDelete = "Do you want to uninstall One Drive?"
$Unpin = "Do you want to unpin all items from the Start menu?" $Unpin = "Do you want to unpin all items from the Start menu?"
$InstallNET = "Do you want to install .NET 3.5?" $InstallNET = "Do you want to install .NET 3.5?"
$LastUsedFilesFolders = "Do you want to hide last used files and folders in Explorer?"
$LastUsedFilesFolders2 = "Do you want to show last used files and folders in Explorer?"
$ClearLastUsedFilesFolders = "Do you want to clear last used files and folders?"
$AeroShake = "Do you want to disable AeroShake?"
$AeroShake2 = "Do you want to re-enable AeroShake?"
$Prompt1 = [Windows.MessageBox]::Show($Ask, "Debloat or Revert", $Button, $ErrorIco) $Prompt1 = [Windows.MessageBox]::Show($Ask, "Debloat or Revert", $Button, $ErrorIco)
Switch ($Prompt1) { Switch ($Prompt1) {
#This will debloat Windows 10 #This will debloat Windows 10
@ -848,9 +858,21 @@ Switch ($Prompt1) {
Write-Host "Skipping .NET install." Write-Host "Skipping .NET install."
} }
} }
# #Prompt asking if you want to deactivate Last Used Files and Folders
# $Prompt7 = [Windows.MessageBox]::Show($LastUsedFilesFolders, "Deactivate Last Used Files and Folders", $Button, $Warn)
# Switch ($Prompt7) {
# Yes {
# DisableLastUsedFilesAndFolders
# Write-Host "Last Used Files and Folders will no longer been shown!"
# }
# No {
# Write-Host "Skipping Hiding Last used Files and Folders."
# }
# }
#Prompt asking if you'd like to reboot your machine #Prompt asking if you'd like to reboot your machine
$Prompt7 = [Windows.MessageBox]::Show($Reboot, "Reboot", $Button, $Warn) $Prompt0 = [Windows.MessageBox]::Show($Reboot, "Reboot", $Button, $Warn)
Switch ($Prompt7) { Switch ($Prompt0) {
Yes { Yes {
Write-Host "Unloading the HKCR drive..." Write-Host "Unloading the HKCR drive..."
Remove-PSDrive HKCR Remove-PSDrive HKCR
@ -888,8 +910,8 @@ Switch ($Prompt1) {
} }
} }
#Prompt asking if you'd like to reboot your machine #Prompt asking if you'd like to reboot your machine
$Prompt7 = [Windows.MessageBox]::Show($Reboot, "Reboot", $Button, $Warn) $Prompt0 = [Windows.MessageBox]::Show($Reboot, "Reboot", $Button, $Warn)
Switch ($Prompt7) { Switch ($Prompt0) {
Yes { Yes {
Write-Host "Unloading the HKCR drive..." Write-Host "Unloading the HKCR drive..."
Remove-PSDrive HKCR Remove-PSDrive HKCR

Loading…
Cancel
Save