Improved File Runner lib

- Renamed Win10Script to Win10ScriptCLI.ps1
- Use file runner on both Win10Script Minimal and GUI
- Added more Bloat Apps to remove from Samsung Devices (Taken from a Samsung Book)
main
Plínio Larrubia 3 years ago committed by Plínio Larrubia
parent 3308dba885
commit dcc0137ba0
No known key found for this signature in database
GPG Key ID: 057B0A87CB137C69

@ -16,16 +16,16 @@ but you'll probably want the most recent version anyway.
<div align="center">
| Download | Version Supported | Build | Editions | Powershell version |
| :-------------------------------------------------------------------------------------------------------------: | :---------------: | :---: | :------: | :-------------------------------------------------------------------------------------------: |
| <h3><a href="https://github.com/LeDragoX/Win-10-Smart-Debloat-Tools/archive/main.zip">⬇️ Download [Zip]</a></h3> | 21H2 or Older | 22000 | Home/Pro | <img width=20px src="./src/assets/powershell-icon.png" style="vertical-align: bottom" /> v5.1 |
| Download | Version Supported | Editions | Powershell version |
| :--------------------------------------------------------------------------------------------------------------: | :---------------: | :------: | :-------------------------------------------------------------------------------------------: |
| <h3><a href="https://github.com/LeDragoX/Win-10-Smart-Debloat-Tools/archive/main.zip">⬇️ Download [Zip]</a></h3> | 21H2 or Older | Home/Pro | <img width=20px src="./src/assets/powershell-icon.png" style="vertical-align: bottom" /> v5.1 |
</div>
## 📄 Resume
This is an adapted version from [another project](https://github.com/W4RH4WK/Debloat-Windows-10).
These scripts will Customize, Debloat and Improve Security/Performance on Windows 10+.
These scripts will Customize, Debloat and Improve Privacy/Performance on Windows 10+.
_Use on a fresh windows install to note the differences._
@ -64,7 +64,7 @@ _The `Apply Tweaks` button is the main one for debloating._
- Copy and Paste this entire line below on **Powershell**:
```ps1
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force; ls -Recurse *.ps*1 | Unblock-File; .\"Win10Script.ps1"
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force; ls -Recurse *.ps*1 | Unblock-File; .\"Win10ScriptCLI.ps1"
```
**[Scripts](./src/scripts) can be run individually, pick what you need.**
@ -81,7 +81,7 @@ Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force; ls -Recurse *.ps*1 |
- `Revert Tweaks`: Re-apply some tweaks and [Revert] all possible ones, covering the `Scheduled Tasks`, `Services`, `Privacy and Performance`, `Personal` and `Optional Features` tweaks;
- `Dark Theme & Light Theme`: Apply [Dark Theme](./src/utils/use-dark-theme.reg) or [Light Theme](./src/utils/use-light-theme.reg) on Windows;
- `Enable/Disable Search Indexing`: Let you choose whether the **Windows Search Service** is [enabled](./src/utils/enable-search-idx.ps1) or [disabled](src/utils/disable-search-idx.ps1);
- `Enable/Disable Background Apps`: Let you choose whether *ALL* the **Background Apps** are [enabled](./src/utils/enable-bg-apps.reg) or [disabled](src/utils/disable-bg-apps.reg);
- `Enable/Disable Background Apps`: Let you choose whether _ALL_ the **Background Apps** are [enabled](./src/utils/enable-bg-apps.reg) or [disabled](src/utils/disable-bg-apps.reg);
- `Enable Telemetry & Disable Telemetry`: Let you choose whether the **Windows Telemetry** is [enabled](./src/utils/enable-full-telemetry.reg) or [disabled](src/utils/disable-telemetry.reg);
- `Enable/Disable Cortana`: Let you choose whether the **Cortana** is [enabled](./src/utils/enable-cortana.reg) or [disabled](src/utils/disable-cortana.reg);
- `Enable/Disable Xbox GameBar/DVR`: Let you choose whether the **Xbox GameBar/DVR (In-Game)** is [enabled](./src/utils/enable-game-bar-dvr.reg) or [disabled](src/utils/disable-game-bar-dvr.reg);
@ -229,9 +229,10 @@ Just open an issue or send me a pull request. (Yes, if it's useful, you can).
<p>How To (Advanced Users)</p>
By using [SysInternal Suite](https://docs.microsoft.com/en-us/sysinternals/downloads/sysinternals-suite) `Procmon(64).exe` i could track the `SystemSettings.exe` by filtering per Process Name `(Ctrl + L)`.
- But, not every time filtering the application you want will show the registry tweaks that were applied, so make sure other processes appear.
- Then use `Clearing the list (Ctrl + X)` (But make sure it is `Capturing the Events (Ctrl + E)`) and finally, applying an option of the Windows Configurations
and searching the Registry Key inside `Procmon(64).exe`.
and searching the Registry Key inside `Procmon(64).exe`.
- Also make sure to disable the Events being captured `(Ctrl + E)` after applying a specific config.
![Grab the current tweak on registry with Procmon64.exe](./src/assets/grab-the-current-tweak-on-registry-with-procmon64.png)

@ -8,11 +8,6 @@ function Open-Scripts() {
$DoneTitle = "Done"
$DoneMessage = "Process Completed!"
Push-Location -Path "src\scripts\"
Get-ChildItem -Recurse *.ps*1 | Unblock-File
Clear-Host
$Scripts = @(
# [Recommended order]
"backup-system.ps1",
@ -29,14 +24,7 @@ function Open-Scripts() {
"win11-wsl-preview-install.ps1"
)
ForEach ($FileName in $Scripts) {
Write-TitleCounter -Text "$FileName" -MaxNum $Scripts.Length
PowerShell -NoProfile -ExecutionPolicy Bypass -file .\"$FileName"
}
Pop-Location
Show-Message -Title "$DoneTitle" -Message "$DoneMessage"
Open-PowerShellFiles -RelativeLocation "src\scripts" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage -OpenFromGUI $false
}
function Main() {
@ -48,6 +36,7 @@ function Main() {
Get-ChildItem -Recurse $PSScriptRoot\*.ps*1 | Unblock-File
Import-Module -DisableNameChecking "$PSScriptRoot\src\lib\set-console-style.psm1"
Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"file-runner.psm1"
Import-Module -DisableNameChecking "$PSScriptRoot\src\lib\set-script-policy.psm1"
Import-Module -DisableNameChecking "$PSScriptRoot\src\lib\show-message-box.psm1"
Import-Module -DisableNameChecking "$PSScriptRoot\src\lib\title-templates.psm1"

@ -525,7 +525,7 @@ function Show-GUI() {
"win11-wsl-preview-install.ps1"
)
Open-PowerShellFilesOnGUI -RelativeLocation "src\scripts" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFiles -RelativeLocation "src\scripts" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
$PictureBox1.imageLocation = "$PSScriptRoot\src\assets\script-logo2.png"
$PictureBox1.SizeMode = [System.Windows.Forms.PictureBoxSizeMode]::StretchImage
@ -535,28 +535,28 @@ function Show-GUI() {
$RemoveXbox.Add_Click( {
$Scripts = @("remove-and-disable-xbox.ps1")
Open-PowerShellFilesOnGUI -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFiles -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})
$RepairWindows.Add_Click( {
$Scripts = @("backup-system.ps1", "repair-windows.ps1")
Open-PowerShellFilesOnGUI -RelativeLocation "src\scripts" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFiles -RelativeLocation "src\scripts" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})
$InstallOneDrive.Add_Click( {
$Scripts = @("install-onedrive.ps1")
Open-PowerShellFilesOnGUI -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFiles -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})
$ReinstallBloatApps.Add_Click( {
$Scripts = @("reinstall-pre-installed-apps.ps1")
Open-PowerShellFilesOnGUI -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFiles -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})
$RevertScript.Add_Click( {
$Global:Revert = $true
$Scripts = @("optimize-scheduled-tasks.ps1", "optimize-services.ps1", "optimize-privacy-and-performance.ps1", "personal-tweaks.ps1", "optimize-optional-features.ps1")
Open-PowerShellFilesOnGUI -RelativeLocation "src\scripts" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFiles -RelativeLocation "src\scripts" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
$Global:Revert = $false
})
@ -572,12 +572,12 @@ function Show-GUI() {
$EnableSearchIdx.Add_Click( {
$Scripts = @("enable-search-idx.ps1")
Open-PowerShellFilesOnGUI -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFiles -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})
$DisableSearchIdx.Add_Click( {
$Scripts = @("disable-search-idx.ps1")
Open-PowerShellFilesOnGUI -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFiles -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})
$EnableBgApps.Add_Click( {
@ -642,7 +642,7 @@ function Show-GUI() {
$InstallDrivers.Add_Click( {
$Scripts = @("install-drivers-updaters.ps1")
Open-PowerShellFilesOnGUI -RelativeLocation "src\scripts" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFiles -RelativeLocation "src\scripts" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})
$BraveBrowser.Add_Click( {
@ -751,7 +751,7 @@ function Show-GUI() {
$GitAndKeysSetup.Add_Click( {
$Scripts = @("setup-git-keys-and-sign.ps1")
Open-PowerShellFilesOnGUI -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFiles -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})
$JavaJRE.Add_Click( {
@ -808,7 +808,7 @@ function Show-GUI() {
$InstallGamingDependencies.Add_Click( {
$Scripts = @("install-gaming-dependencies.ps1")
Open-PowerShellFilesOnGUI -RelativeLocation "src\scripts" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFiles -RelativeLocation "src\scripts" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})
$Discord.Add_Click( {
@ -929,12 +929,12 @@ function Show-GUI() {
$WSL2.Add_Click( {
$Scripts = @("win10-wsl2-wslg-install.ps1")
Open-PowerShellFilesOnGUI -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFiles -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})
$WSLPreview.Add_Click( {
$Scripts = @("win11-wsl-preview-install.ps1")
Open-PowerShellFilesOnGUI -RelativeLocation "src\scripts" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFiles -RelativeLocation "src\scripts" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})
$Ubuntu.Add_Click( {
@ -971,7 +971,7 @@ function Show-GUI() {
$ArchWSL.Add_Click( {
$Scripts = @("archwsl-install.ps1")
Open-PowerShellFilesOnGUI -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
Open-PowerShellFiles -RelativeLocation "src\utils" -Scripts $Scripts -DoneTitle $DoneTitle -DoneMessage $DoneMessage
})
# Show the Window
@ -1001,7 +1001,7 @@ function Main() {
Set-ConsoleStyle # Makes the console look cooler
Set-UnrestrictedPermissions # Unlock script usage
Import-Module -DisableNameChecking "$PSScriptRoot\src\scripts\install-package-managers.ps1" -Force # Install Winget and Chocolatey at the beginning
Open-PowerShellFiles -RelativeLocation "src\scripts" -Scripts "install-package-managers.ps1" -DoneTitle $DoneTitle -DoneMessage $DoneMessage -ShowDoneWindow $false # Install Winget and Chocolatey at the beginning
Write-ASCIIScriptName # Thanks Figlet
Show-GUI # Load the GUI

@ -1,12 +1,16 @@
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"show-message-box.psm1"
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\"title-templates.psm1"
function Open-PowerShellFilesOnGUI {
function Open-PowerShellFiles {
param (
[String] $RelativeLocation,
[Array] $Scripts,
[String] $DoneTitle,
[String] $DoneMessage
[String] $DoneMessage,
[Parameter(Mandatory = $false)]
[Bool] $ShowDoneWindow = $true,
[Parameter(Mandatory = $false)]
[Bool] $OpenFromGUI = $true
)
Push-Location -Path "$PSScriptRoot\..\..\$RelativeLocation"
@ -14,12 +18,21 @@ function Open-PowerShellFilesOnGUI {
ForEach ($FileName in $Scripts) {
Write-TitleCounter -Text "$FileName" -MaxNum $Scripts.Length
Import-Module -DisableNameChecking .\"$FileName" -Force
If ($OpenFromGUI) {
Import-Module -DisableNameChecking .\"$FileName" -Force
}
Else {
PowerShell -NoProfile -ExecutionPolicy Bypass -file .\"$FileName"
}
}
Pop-Location
Show-Message -Title "$DoneTitle" -Message "$DoneMessage"
If ($ShowDoneWindow) {
Show-Message -Title "$DoneTitle" -Message "$DoneMessage"
}
}
function Open-RegFiles {
param (
[String] $RelativeLocation,

@ -12,9 +12,7 @@ function Show-Message() {
[CmdletBinding()] #<<-- This turns a regular function into an advanced function
param (
[String] $Title = "Insert title here",
[Array] $Message =
"Crash
Bandicoot",
[Array] $Message = "`nCrash`nBandicoot",
[String] $BoxButtons = "OK", # AbortRetryIgnore, OK, OKCancel, RetryCancel, YesNo, YesNoCancel,
[String] $BoxIcon = "Information" # Information, Question, Warning, Error or None
)

@ -61,6 +61,7 @@ function Remove-BloatwareApps() {
"*ACGMediaPlayer*"
"*ActiproSoftwareLLC*"
"*AdobePhotoshopExpress*" # Adobe Photoshop Express
"*Amazon.com.Amazon*" # Amazon Shop
"*Asphalt8Airborne*" # Asphalt 8 Airbone
"*AutodeskSketchBook*"
"*BubbleWitch3Saga*" # Bubble Witch 3 Saga
@ -92,6 +93,7 @@ function Remove-BloatwareApps() {
"*PolarrPhotoEditorAcademicEdition*"
"*RoyalRevolt*" # Royal Revolt
"*Shazam*"
"*Sidia.LiveWallpaper*" # Live Wallpaper
"*SlingTV*"
"*Speed Test*"
"*Sway*"
@ -102,6 +104,26 @@ function Remove-BloatwareApps() {
"*Wunderlist*"
"*XING*"
# SAMSUNG Bloat
#"SAMSUNGELECTRONICSCO.LTD.SamsungSettings1.2" # Allow user to Tweak some hardware settings
"SAMSUNGELECTRONICSCO.LTD.1412377A9806A"
"SAMSUNGELECTRONICSCO.LTD.NewVoiceNote"
"SAMSUNGELECTRONICSCoLtd.SamsungNotes"
"SAMSUNGELECTRONICSCoLtd.SamsungFlux"
"SAMSUNGELECTRONICSCO.LTD.StudioPlus"
"SAMSUNGELECTRONICSCO.LTD.SamsungWelcome"
"SAMSUNGELECTRONICSCO.LTD.SamsungUpdate"
"SAMSUNGELECTRONICSCO.LTD.SamsungSecurity1.2"
"SAMSUNGELECTRONICSCO.LTD.SamsungScreenRecording"
#"SAMSUNGELECTRONICSCO.LTD.SamsungRecovery" # Used to Factory Reset
"SAMSUNGELECTRONICSCO.LTD.SamsungQuickSearch"
"SAMSUNGELECTRONICSCO.LTD.SamsungPCCleaner"
"SAMSUNGELECTRONICSCO.LTD.SamsungCloudBluetoothSync"
"SAMSUNGELECTRONICSCO.LTD.PCGallery"
"SAMSUNGELECTRONICSCO.LTD.OnlineSupportSService"
"4AE8B7C2.BOOKING.COMPARTNERAPPSAMSUNGEDITION"
# Apps which other apps depend on
"Microsoft.Advertising.Xaml"

Loading…
Cancel
Save