Fixed bug with clearing start for all users

This commit is contained in:
Raphire
2025-06-11 00:05:10 +02:00
parent 67d529c22b
commit 8bc12a5a85
3 changed files with 3 additions and 3 deletions

View File

@@ -595,7 +595,7 @@ function RestartExplorer {
# 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 ReplaceStartMenuForAllUsers { function ReplaceStartMenuForAllUsers {
param ( param (
$startMenuTemplate = "$PSScriptRoot/Start/start2.bin" $startMenuTemplate = "$PSScriptRoot/Assets/Start/start2.bin"
) )
Write-Output "> Removing all pinned apps from the start menu for all users..." Write-Output "> Removing all pinned apps from the start menu for all users..."
@@ -613,7 +613,7 @@ function ReplaceStartMenuForAllUsers {
# Go through all users and replace the start menu file # Go through all users and replace the start menu file
ForEach ($startMenuPath in $usersStartMenuPaths) { ForEach ($startMenuPath in $usersStartMenuPaths) {
ReplaceStartMenu "$($startMenuPath.Fullname)\start2.bin" $startMenuTemplate ReplaceStartMenu $startMenuTemplate "$($startMenuPath.Fullname)\start2.bin"
} }
# Also replace the start menu file for the default user profile # Also replace the start menu file for the default user profile
@@ -636,7 +636,7 @@ 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 (
$startMenuTemplate = "$PSScriptRoot/Start/start2.bin", $startMenuTemplate = "$PSScriptRoot/Assets/Start/start2.bin",
$startMenuBinFile = "$env:LOCALAPPDATA\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState\start2.bin" $startMenuBinFile = "$env:LOCALAPPDATA\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState\start2.bin"
) )