mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-11-17 11:06:18 +00:00
Improved user output when clearing start menu
This commit is contained in:
@@ -126,6 +126,9 @@ function ClearStartMenu {
|
|||||||
# Check if bin file exists
|
# Check if bin file exists
|
||||||
if(Test-Path $startmenuBinFile) {
|
if(Test-Path $startmenuBinFile) {
|
||||||
Copy-Item -Path $startmenuTemplate -Destination $startmenu -Force
|
Copy-Item -Path $startmenuTemplate -Destination $startmenu -Force
|
||||||
|
|
||||||
|
$cpyMsg = "Replaced start menu for user " + $startmenu.Fullname.Split("\")[2]
|
||||||
|
Write-Output $cpyMsg
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# Bin file doesn't exist, indicating the user is not running the correct version of windows. Exit function
|
# Bin file doesn't exist, indicating the user is not running the correct version of windows. Exit function
|
||||||
@@ -141,11 +144,13 @@ function ClearStartMenu {
|
|||||||
|
|
||||||
# Create folder if it doesn't exist
|
# Create folder if it doesn't exist
|
||||||
if(-not(Test-Path $defaultProfile)) {
|
if(-not(Test-Path $defaultProfile)) {
|
||||||
new-item $defaultProfile -ItemType Directory -Force
|
new-item $defaultProfile -ItemType Directory -Force | Out-Null
|
||||||
|
Write-Output "Created LocalState folder for default user"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Copy template to default profile
|
# Copy template to default profile
|
||||||
Copy-Item -Path $startmenuTemplate -Destination $defaultProfile -Force
|
Copy-Item -Path $startmenuTemplate -Destination $defaultProfile -Force
|
||||||
|
Write-Output "Copied start menu template to default user folder"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user