mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-11-17 02:56:17 +00:00
Added extra check for template file ext. when replacing start menu
Changed links in README.md and Get.ps1 to use latest tagged release
This commit is contained in:
@@ -645,13 +645,18 @@ function ReplaceStartMenu {
|
||||
|
||||
# Check if template bin file exists, return early if it doesn't
|
||||
if (-not (Test-Path $startMenuTemplate)) {
|
||||
Write-Host "Error: Unable to replace start menu, template start2.bin file not found" -ForegroundColor Red
|
||||
Write-Host "Error: Unable to replace start menu, template file not found" -ForegroundColor Red
|
||||
return
|
||||
}
|
||||
|
||||
if ([IO.Path]::GetExtension($startMenuTemplate) -ne ".bin" ) {
|
||||
Write-Host "Error: Unable to replace start menu, template file is not a valid .bin file" -ForegroundColor Red
|
||||
return
|
||||
}
|
||||
|
||||
# Check if bin file exists, return early if it doesn't
|
||||
if (-not (Test-Path $startMenuBinFile)) {
|
||||
Write-Host "Error: Unable to replace start menu for user $(GetUserName), template start2.bin file not found" -ForegroundColor Red
|
||||
Write-Host "Error: Unable to replace start menu for user $(GetUserName), original start2.bin file not found" -ForegroundColor Red
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user