Skip to content

Commit

Permalink
fix: use proper exit codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyueta committed Aug 8, 2023
1 parent 1a582b1 commit 901b8d7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pause
set /P c="This will disable SearchApp and StartMenuExperienceHost, are you sure you want to continue [Y/N]? "
if /I "!c!" == "Y" goto continSS
if /I "!c!" == "N" exit /b
if /I "!c!" == "" echo No option selected - launch the script again. & pause & exit
if /I "!c!" == "" echo No option selected - launch the script again. & pause & exit /b 1
:continSS
:: Rename start menu
chdir /d !windir!\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ping -n 1 -4 www.example.com | find "time=" > nul 2>&1
if !errorlevel! == 1 (
echo You must have an internet connection to use this script.
pause
exit /b
exit /b 1
)

if exist "!windir!\SystemApps\Microsoft.Windows.Search_cw5n1h2txyewy\SearchApp.exe" goto existOS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ echo]
echo Press any key to enable UAC... [?25l
pause > nul
call "%~f0"
exit
exit /b 1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ping -n 1 -4 www.example.com | find "time=" > nul 2>&1
if !errorlevel! == 1 (
echo You must have an internet connection to use this script.
pause
exit /b
exit /b 1
)

:: Download and install Process Explorer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if "%*"=="" (
echo You must run this script as admin.
pause & exit /b 1
)
exit /b 0
exit /b
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if "%*"=="" (
echo You must run this script as admin.
pause & exit /b 1
)
exit /b 0
exit /b
)
)

Expand Down

0 comments on commit 901b8d7

Please sign in to comment.