fix: Replace PAUSE with message syntax (not supported in DOS 6.22)

Issue: DOS 6.22 PAUSE command does not accept message text as parameter.
The syntax "PAUSE message..." is a Windows NT/2000+ feature that causes
command-line parameters (%1, %2, etc.) to be consumed/lost in DOS 6.22.

Root cause: User ran "T:\DEPLOY.BAT TS-4R" but script reported
"Machine name not provided". The parameter %1 was being consumed by
the invalid PAUSE syntax at line 31 before reaching GET_MACHINE_NAME.

Changes:
- Fixed 46 PAUSE commands across 9 BAT files
- Converted "PAUSE message..." to "ECHO message..." + "PAUSE"
- Updated check-dos-compatibility.ps1 to detect PAUSE with message
- Created fix-pause-syntax.ps1 automated fix script

Example fix:
BEFORE (Windows NT+ syntax, causes parameter loss):
  PAUSE Press any key to continue...

AFTER (DOS 6.22 compatible):
  ECHO Press any key to continue...
  PAUSE

DOS 6.22 PAUSE command:
- Syntax: PAUSE (no parameters)
- Displays: "Press any key to continue..."
- Cannot customize message (built-in text only)

Files modified:
- DEPLOY.BAT: 10 PAUSE commands fixed
- UPDATE.BAT: 7 PAUSE commands fixed
- CTONW.BAT: 8 PAUSE commands fixed
- NWTOC.BAT: 6 PAUSE commands fixed
- REBOOT.BAT: 4 PAUSE commands fixed
- STAGE.BAT: 6 PAUSE commands fixed
- CHECKUPD.BAT: 2 PAUSE commands fixed
- DOSTEST.BAT: 2 PAUSE commands fixed
- AUTOEXEC.BAT: 1 PAUSE command fixed

Deployed to:
- D2TESTNAS: /data/test/*.BAT (9,908 bytes for DEPLOY.BAT)

Testing: Should now correctly receive command-line parameter:
  T:\DEPLOY.BAT TS-4R

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-19 17:19:44 -07:00
parent e040cc99ff
commit 3b55cf1312
11 changed files with 154 additions and 46 deletions

View File

@@ -43,7 +43,8 @@ ECHO.
ECHO Backups will be saved as .SAV files.
ECHO.
ECHO Press Ctrl+C to cancel, or
PAUSE Press any key to continue...
ECHO Press any key to continue...
PAUSE
ECHO.
REM ==================================================================
@@ -118,7 +119,8 @@ ECHO Then reboot
ECHO.
ECHO ==============================================================
ECHO.
PAUSE Press any key to continue...
ECHO Press any key to continue...
PAUSE
GOTO END
REM ==================================================================
@@ -135,7 +137,8 @@ ECHO.
ECHO Run NWTOC to download updates from network, then:
ECHO CALL C:\BAT\STAGE.BAT
ECHO.
PAUSE Press any key to exit...
ECHO Press any key to exit...
PAUSE
GOTO END
:UPDATE_ERROR
@@ -154,7 +157,8 @@ ECHO 1. Boot from DOS floppy
ECHO 2. Copy .SAV files back to .BAT and .SYS
ECHO 3. Remove floppy and reboot
ECHO.
PAUSE Press any key to exit...
ECHO Press any key to exit...
PAUSE
GOTO END
REM ==================================================================