@@ -295,9 +295,17 @@ if %$cliMode% equ 0 (
295295 echo :
296296 echo Press any key to exit.
297297 pause > nul
298+ exit 0
299+ ) else (
300+ echo Success - The PHP CLI version is now !$availablePhpVersionsArray[%$newSelectionId%]!
301+ exit /B 0
298302)
299303
300- exit 0
304+
305+ rem -----------------------------
306+ rem Exit Subroutines - Notice
307+ rem -----------------------------
308+
301309
302310rem A current selection was given.
303311:currentSelectionGiven
@@ -308,10 +316,12 @@ if %$cliMode% equ 0 (
308316 echo :
309317 echo Press any key to exit.
310318 pause > nul
319+ exit 0
320+ ) else (
321+ echo Notice: The PHP CLI version remains unchanged.
322+ exit /B 0
311323)
312324
313- exit 0
314-
315325
316326rem ------------------------------
317327rem Exit Subroutines - Failure
@@ -326,9 +336,12 @@ if %$cliMode% equ 0 (
326336 echo :
327337 echo Press any key to exit.
328338 pause > nul
339+ exit 1
340+ ) else (
341+ echo Failure: An invalid php version was given - The PHP CLI version remains unchanged.
342+ exit /B 1
329343)
330344
331- exit 1
332345
333346rem ----------------------------
334347rem Exit Subroutines - Error
@@ -344,27 +357,36 @@ if %$cliMode% equ 0 (
344357 echo :
345358 echo Press any key to exit.
346359 pause > nul
360+ exit 1
361+ ) else (
362+ echo Error: The $customInstallPath path " %$customInstallPath% " does not exist.
363+ exit /B 1
347364)
348365
349- exit 1
350366
351367rem Both of the default install paths are missing.
352368:defaultInstallPathsMissing
353369if %$cliMode% equ 0 (
354370 color %$colorFailure%
355371 echo :
356- echo Neither of the default install paths exists.
372+ echo Neither of the default installation paths exists.
357373 echo :
358- echo 1. %$defaultInstallPath[0]%
359- echo 2. %$defaultInstallPath[1]%
374+ echo 1. %$defaultInstallPath[0]%
375+ echo 2. %$defaultInstallPath[1]%
360376 echo :
361- echo Wampserver does not appear to be installed.
377+ echo WampServer does not appear to be installed.
362378 echo :
363379 echo Press any key to exit.
364380 pause > nul
381+ exit 1
382+ ) else (
383+ echo Error: Neither of the default installation paths exists.
384+ echo 1. %$defaultInstallPath[0]%
385+ echo 2. %$defaultInstallPath[1]%
386+ echo WampServer does not appear to be installed.
387+ exit /B 1
365388)
366389
367- exit 1
368390
369391rem An invalid $pathToPhpFolders was given.
370392:invalidPathToPhpFoldersGiven
@@ -378,6 +400,9 @@ if %$cliMode% equ 0 (
378400 echo :
379401 echo Press any key to exit.
380402 pause > nul
381- )
382-
383- exit 1
403+ exit 1
404+ ) else (
405+ echo Error: The $pathToPhpFolders path " %$pathToPhpFolders% " does not exist.
406+ echo See the WampServer website for help.
407+ exit /B 1
408+ )
0 commit comments