From e3b4ea24dae4577e5cb7f4d491b11f1cd9a52756 Mon Sep 17 00:00:00 2001 From: Rohan Kapadia Date: Tue, 24 Dec 2024 20:32:07 +0530 Subject: [PATCH] fix: use env:USERNAME when removing start menu items (#169) --- Win11Debloat.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Win11Debloat.ps1 b/Win11Debloat.ps1 index 13001a3..1e99566 100644 --- a/Win11Debloat.ps1 +++ b/Win11Debloat.ps1 @@ -605,7 +605,7 @@ function ReplaceStartMenu { $startMenuTemplate = "$PSScriptRoot/Start/start2.bin" ) - $userName = $startMenuBinFile.Split("\")[2] + $userName = $env:USERNAME # Check if template bin file exists, return early if it doesn't if (-not (Test-Path $startMenuTemplate)) {