mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-11-17 02:56:17 +00:00
Added option to replace the start menu with your own template
This commit is contained in:
@@ -8,7 +8,7 @@ all the settings yourself, or remove apps one by one.
|
|||||||
-------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------
|
||||||
App Removal
|
App Removal
|
||||||
- Remove a wide variety of bloatware apps.
|
- Remove a wide variety of bloatware apps.
|
||||||
- Remove all pinned apps from start for the current user, or for all existing & new users. (W11 only)
|
- Remove or replace all pinned apps from start for the current user, or for all existing & new users. (W11 only)
|
||||||
|
|
||||||
Telemetry, Tracking & Suggested Content
|
Telemetry, Tracking & Suggested Content
|
||||||
- Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads.
|
- Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads.
|
||||||
|
|||||||
2
Get.ps1
2
Get.ps1
@@ -36,7 +36,9 @@ param (
|
|||||||
[switch]$DisableChat, [switch]$HideChat,
|
[switch]$DisableChat, [switch]$HideChat,
|
||||||
[switch]$EnableEndTask,
|
[switch]$EnableEndTask,
|
||||||
[switch]$ClearStart,
|
[switch]$ClearStart,
|
||||||
|
[string]$ReplaceStart,
|
||||||
[switch]$ClearStartAllUsers,
|
[switch]$ClearStartAllUsers,
|
||||||
|
[string]$ReplaceStartAllUsers,
|
||||||
[switch]$RevertContextMenu,
|
[switch]$RevertContextMenu,
|
||||||
[switch]$DisableMouseAcceleration,
|
[switch]$DisableMouseAcceleration,
|
||||||
[switch]$DisableStickyKeys,
|
[switch]$DisableStickyKeys,
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ Below is an overview of the key features and functionality offered by Win11Deblo
|
|||||||
#### App Removal
|
#### App Removal
|
||||||
|
|
||||||
- Remove a wide variety of preinstalled apps. Click [here](https://github.com/Raphire/Win11Debloat/wiki/App-Removal) for more info.
|
- Remove a wide variety of preinstalled apps. Click [here](https://github.com/Raphire/Win11Debloat/wiki/App-Removal) for more info.
|
||||||
- Remove all pinned apps from start for the current user, or for all existing & new users. (Windows 11 only)
|
- Remove or replace all pinned apps from start for the current user, or for all existing & new users. (Windows 11 only)
|
||||||
|
|
||||||
#### Telemetry, Tracking & Suggested Content
|
#### Telemetry, Tracking & Suggested Content
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,9 @@ param (
|
|||||||
[switch]$DisableChat, [switch]$HideChat,
|
[switch]$DisableChat, [switch]$HideChat,
|
||||||
[switch]$EnableEndTask,
|
[switch]$EnableEndTask,
|
||||||
[switch]$ClearStart,
|
[switch]$ClearStart,
|
||||||
|
[string]$ReplaceStart,
|
||||||
[switch]$ClearStartAllUsers,
|
[switch]$ClearStartAllUsers,
|
||||||
|
[string]$ReplaceStartAllUsers,
|
||||||
[switch]$RevertContextMenu,
|
[switch]$RevertContextMenu,
|
||||||
[switch]$DisableMouseAcceleration,
|
[switch]$DisableMouseAcceleration,
|
||||||
[switch]$DisableStickyKeys,
|
[switch]$DisableStickyKeys,
|
||||||
@@ -632,8 +634,8 @@ function ReplaceStartMenuForAllUsers {
|
|||||||
# Credit: https://lazyadmin.nl/win-11/customize-windows-11-start-menu-layout/
|
# Credit: https://lazyadmin.nl/win-11/customize-windows-11-start-menu-layout/
|
||||||
function ReplaceStartMenu {
|
function ReplaceStartMenu {
|
||||||
param (
|
param (
|
||||||
$startMenuBinFile = "$env:LOCALAPPDATA\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState\start2.bin",
|
$startMenuTemplate = "$PSScriptRoot/Start/start2.bin",
|
||||||
$startMenuTemplate = "$PSScriptRoot/Start/start2.bin"
|
$startMenuBinFile = "$env:LOCALAPPDATA\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState\start2.bin"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Change path to correct user if a user was specified
|
# Change path to correct user if a user was specified
|
||||||
@@ -643,13 +645,13 @@ function ReplaceStartMenu {
|
|||||||
|
|
||||||
# Check if template bin file exists, return early if it doesn't
|
# Check if template bin file exists, return early if it doesn't
|
||||||
if (-not (Test-Path $startMenuTemplate)) {
|
if (-not (Test-Path $startMenuTemplate)) {
|
||||||
Write-Host "Error: Unable to clear start menu, start2.bin file missing from script folder" -ForegroundColor Red
|
Write-Host "Error: Unable to replace start menu, template start2.bin file not found" -ForegroundColor Red
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check if bin file exists, return early if it doesn't
|
# Check if bin file exists, return early if it doesn't
|
||||||
if (-not (Test-Path $startMenuBinFile)) {
|
if (-not (Test-Path $startMenuBinFile)) {
|
||||||
Write-Host "Error: Unable to clear start menu for user $(GetUserName), start2.bin file could not found" -ForegroundColor Red
|
Write-Host "Error: Unable to replace start menu for user $(GetUserName), template start2.bin file not found" -ForegroundColor Red
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1553,10 +1555,20 @@ switch ($script:Params.Keys) {
|
|||||||
Write-Output ""
|
Write-Output ""
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
'ReplaceStart' {
|
||||||
|
Write-Output "> Replacing the start menu for user $(GetUserName)..."
|
||||||
|
ReplaceStartMenu $script:Params.Item("ReplaceStart")
|
||||||
|
Write-Output ""
|
||||||
|
continue
|
||||||
|
}
|
||||||
'ClearStartAllUsers' {
|
'ClearStartAllUsers' {
|
||||||
ReplaceStartMenuForAllUsers
|
ReplaceStartMenuForAllUsers
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
'ReplaceStartAllUsers' {
|
||||||
|
ReplaceStartMenuForAllUsers $script:Params.Item("ReplaceStartAllUsers")
|
||||||
|
continue
|
||||||
|
}
|
||||||
'DisableStartRecommended' {
|
'DisableStartRecommended' {
|
||||||
RegImport "> Disabling and hiding the start menu recommended section..." "Disable_Start_Recommended.reg"
|
RegImport "> Disabling and hiding the start menu recommended section..." "Disable_Start_Recommended.reg"
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user