DOS Update System - Technical Documentation
System Overview
The DOS Update System automatically downloads software updates and uploads test data on every machine boot. No manual intervention required.
Key Features:
- Automatic updates on boot
- Centralized file management on AD2
- 15-minute sync interval to NAS
- DOS 6.22 compatible
System Architecture
File Flow
┌─────────────────────────────────────────────────────────────────┐
│ AD2 Server (192.168.0.6) │
│ C:\Shares\test\COMMON\ProdSW\ │
│ │
│ Engineers place files here (via \\AD2\test\COMMON\ProdSW\) │
└──────────────────────┬──────────────────────────────────────────┘
│
│ Automatic Sync (every 15 minutes)
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ D2TESTNAS (192.168.0.9) │
│ /data/test/COMMON/ProdSW/ │
│ │
│ DOS machines access via T:\COMMON\ProdSW\ (SMB1) │
└──────────────────────┬──────────────────────────────────────────┘
│
│ NWTOC.BAT downloads updates
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ DOS Machines (~30 units: TS-01 through TS-30) │
│ C:\BAT\ and C:\ATE\ │
│ │
│ AUTOEXEC.BAT runs NWTOC + CTONW automatically on boot │
└─────────────────────────────────────────────────────────────────┘
System Components
AUTOEXEC.BAT
Location: C:\AUTOEXEC.BAT on each DOS machine
Function: Machine startup configuration
Executes on boot:
- Sets machine identity (SET MACHINE=TS-XX)
- Starts network client
- Calls NWTOC.BAT (downloads updates)
- Calls CTONW.BAT (uploads test data)
NWTOC.BAT (Network to Computer)
Location: C:\BAT\NWTOC.BAT
Function: Downloads software updates from network
Download paths:
- T:\COMMON\ProdSW\*.BAT → C:\BAT\
- T:\COMMON\ProdSW\*.EXE → C:\ATE\
- T:\TS-XX\ProdSW\*.* → C:\BAT\ and C:\ATE\
- T:\COMMON\DOS\*.NEW → Staged for reboot
Features:
- Only downloads newer files (XCOPY /D flag)
- Creates .BAK backups before overwriting
- Handles system file staging (AUTOEXEC.NEW, CONFIG.NEW)
CTONW.BAT (Computer to Network)
Location: C:\BAT\CTONW.BAT
Function: Uploads test data and programs to network
Upload paths:
- C:\BAT\*.BAT → T:\TS-XX\ProdSW\
- C:\ATE\*.EXE, *.CFG → T:\TS-XX\ProdSW\
- C:\ATE\*DATA\*.DAT → T:\TS-XX\LOGS\*LOG\
Data routing:
- Programs → ProdSW (for distribution)
- Test data → LOGS (for database import)
DEPLOY.BAT
Location: T:\COMMON\ProdSW\DEPLOY.BAT
Function: Initial machine deployment
Usage: T:\UPDATE.BAT TS-XX (one-time setup)
Deployment steps:
- Creates C:\BAT\ directory
- Copies all batch files to C:\BAT\
- Installs AUTOEXEC.BAT with machine name
- Creates network backup folder T:\TS-XX\
UPDATE.BAT (Root Redirect)
Location: T:\UPDATE.BAT
Function: Shortcut to DEPLOY.BAT
Usage: T:\UPDATE.BAT TS-XX
@ECHO OFF
REM UPDATE.BAT - Redirect to DEPLOY.BAT in proper location
REM Usage: UPDATE.BAT machine-name
REM Example: UPDATE.BAT TS-4R
CALL T:\COMMON\ProdSW\DEPLOY.BAT %1
Automatic Workflow
- DOS machine boots
- Network starts (C:\NET\STARTNET.BAT)
- NWTOC runs automatically (downloads updates)
- CTONW runs automatically (uploads test data)
- System ready for testing
User actions required: None
Deployment Status
Files on AD2:
- Location:
C:\Shares\test\COMMON\ProdSW\
- Access:
\\AD2\test\COMMON\ProdSW\
Sync to NAS:
- Frequency: Every 15 minutes
- Destination:
/data/test/COMMON/ProdSW/
- DOS Access:
T:\COMMON\ProdSW\
DOS 6.22 Compatibility
Directory testing: Uses *.* wildcard instead of NUL device
IF NOT EXIST C:\BAT\*.* MD C:\BAT
Pipe operations: Single pipes with temp files instead of multi-pipe chains
TYPE C:\AUTOEXEC.TM1 | FIND /V "REM Dataforth" > C:\AUTOEXEC.TM2
TYPE C:\AUTOEXEC.TM2 | FIND /V "REM Automatically" > C:\AUTOEXEC.TM3
File List
Core Files:
- AUTOEXEC.BAT (82 lines)
- NWTOC.BAT (221 lines)
- CTONW.BAT (272 lines)
- DEPLOY.BAT (188 lines)
- UPDATE.BAT (5 lines)
Utility Files:
- CHECKUPD.BAT - Check available updates
- STAGE.BAT - System file staging
- REBOOT.BAT - Apply staged updates
Support
Documentation:
- ENGINEER_HOWTO_GUIDE.md - Engineer procedures
- DEPLOYMENT_GUIDE.md - Test staff procedures
Emergency Contact:
- System Down: Contact IT immediately
- Rollback Required: See git history