# DOS Update System - Test Staff Deployment Guide

**Document Version:** 1.0
**Date:** January 19, 2026
**Audience:** Test Staff and Technicians
**Prerequisites:** Access to DOS test machines (TS-01 through TS-30)

---

## What's New?

### Automatic Updates!

**Good news:** You no longer need to manually run update commands!

**Old way:**
1. Boot machine
2. Wait for network
3. Type: `C:\BAT\NWTOC`
4. Type: `C:\BAT\CTONW`
5. Start testing

**New way:**
1. Boot machine
2. Wait for network
3. [OK] Updates download automatically
4. [OK] Test data uploads automatically
5. Start testing

**That's it!** The system now handles updates during boot.

---

## Table of Contents

1. [Quick Start](#quick-start)
2. [Daily Operations](#daily-operations)
3. [Initial Deployment](#initial-deployment)
4. [Understanding the Boot Process](#understanding-the-boot-process)
5. [Manual Operations](#manual-operations)
6. [Troubleshooting](#troubleshooting)
7. [FAQ](#faq)

---

## Quick Start

### Starting Your Day

**For machines already deployed:**

1. Power on DOS machine
2. Wait for boot process (watch the screen)
3. System automatically:
   - Starts network
   - Downloads updates
   - Uploads test data
4. See "System Ready" message
5. Start testing!

**No commands needed!**

---

### First Time Setup (New Machine)

**If machine has never been configured:**

1. Boot machine
2. Wait for network to start
3. Type: `T:\UPDATE.BAT TS-XX` (replace XX with machine number)
   - Example: `T:\UPDATE.BAT TS-04` for machine TS-04
4. Wait for deployment (about 2 minutes)
5. **Reboot when prompted**
6. After reboot, automatic updates enabled!

---

## Daily Operations

### Normal Boot Sequence

When you power on a DOS machine, you'll see:

```
┌─────────────────────────────────────────────────────────────────┐
│ Microsoft(R) MS-DOS(R) Version 6.22                             │
│                                                                  │
│ ==============================================================  │
│   Dataforth Test Machine: TS-04                                 │
│   DOS 6.22 with Automatic Update System                        │
│ ==============================================================  │
│                                                                  │
│ Starting network client...                                      │
│ [OK] Network started                                            │
│                                                                  │
│ Network Drives:                                                 │
│   T: = \\D2TESTNAS\test                                         │
│   X: = \\D2TESTNAS\datasheets                                   │
│                                                                  │
│ Checking for software updates...                                │
│ [1/4] Updating batch files from T:\COMMON\ProdSW...            │
│       [OK] No new batch files in COMMON                         │
│ [2/4] Updating machine-specific files...                        │
│       [SKIP] No machine-specific directory                      │
│ [3/4] Checking for system file updates...                       │
│       [OK] No system file updates                               │
│ [4/4] Checking for network client updates...                    │
│       [OK] No network client updates                            │
│ ==============================================================  │
│ Update Complete                                                 │
│ ==============================================================  │
│                                                                  │
│ Uploading test data to network...                               │
│ [1/3] Uploading batch files from C:\BAT...                     │
│       [OK] Batch files uploaded                                 │
│ [2/3] Uploading programs and config from C:\ATE...             │
│       [OK] Programs uploaded to ProdSW                          │
│ [3/3] Uploading test data to LOGS...                            │
│       [OK] Test data uploaded to LOGS (for database import)     │
│ ==============================================================  │
│ Upload Complete                                                 │
│ ==============================================================  │
│                                                                  │
│ ==============================================================  │
│ System Ready                                                    │
│ ==============================================================  │
│                                                                  │
│ C:\>                                                            │
└─────────────────────────────────────────────────────────────────┘
```

![Screenshot: Normal Boot Sequence]
*Screenshot placeholder: DOS screen showing complete boot process with all status messages*

**Boot time:** Approximately 2-3 minutes (depending on updates)

---

### What Happens During Boot

**Step-by-step breakdown:**

1. **DOS starts** (5 seconds)
   - Loads CONFIG.SYS
   - Runs AUTOEXEC.BAT

2. **Network starts** (30 seconds)
   - Loads Microsoft Network Client
   - Maps T: drive to \\D2TESTNAS\test
   - Maps X: drive to \\D2TESTNAS\datasheets

3. **NWTOC downloads updates** (30-60 seconds)
   - Checks T:\COMMON\ProdSW for new batch files
   - Checks T:\TS-XX\ProdSW for machine-specific files
   - Downloads only newer files (smart update)
   - Creates .BAK backups of replaced files

4. **CTONW uploads test data** (30-60 seconds)
   - Uploads batch files from C:\BAT to network
   - Uploads programs from C:\ATE to network
   - Uploads test data (.DAT files) to LOGS folder

5. **System Ready**
   - Displays command prompt
   - Ready for testing

**Total time:** 2-3 minutes

---

## Initial Deployment

### When to Run Deployment

**Run deployment on:**
- Brand new DOS machine
- Reformatted machine
- Machine without automatic updates

**Do NOT run deployment on:**
- Machines already deployed (unnecessary)
- Machines that auto-update on boot (already deployed)

---

### Deployment Procedure

**Follow these steps exactly:**

#### Step 1: Boot Machine
- Power on DOS machine
- Let it fully boot to C:\> prompt
- Verify network drives mapped (T: and X:)

![Screenshot: DOS Prompt Ready]
*Screenshot placeholder: DOS C:\> prompt with machine name displayed*

#### Step 2: Verify Network Access
Type:
```
DIR T:\
```

You should see:
```
COMMON     <DIR>
TS-01      <DIR>
TS-02      <DIR>
...
```

![Screenshot: T Drive Contents]
*Screenshot placeholder: DOS DIR T:\ output showing COMMON and TS-XX folders*

If you see "Invalid drive" or error, see [Troubleshooting: Network Not Available](#network-not-available)

#### Step 3: Run Deployment Command
Type (replace XX with your machine number):
```
T:\UPDATE.BAT TS-04
```

**Important:**
- Use your actual machine number (TS-01 through TS-30)
- Type exactly as shown (uppercase)
- Press Enter

![Screenshot: Running UPDATE.BAT]
*Screenshot placeholder: DOS screen showing T:\UPDATE.BAT TS-04 command being entered*

#### Step 4: Watch Deployment Progress
You'll see:
```
==============================================================
DOS Update System - Deployment
==============================================================
Machine: TS-04
==============================================================

Installing automatic update system...

Files to install:
  - AUTOEXEC.BAT (startup configuration)
  - NWTOC.BAT (download updates)
  - CTONW.BAT (upload test data)
  - UPDATE.BAT (full backup)
  - CHECKUPD.BAT (check updates)
  - STAGE.BAT (system file updates)
  - REBOOT.BAT (apply staged updates)

Press any key to continue . . .
```

**Press any key to continue**

![Screenshot: Deployment Starting]
*Screenshot placeholder: DOS deployment screen showing file list*

#### Step 5: Deployment Progress
Watch the screen as deployment proceeds:
```
[1/3] Creating C:\BAT directory...
[OK] C:\BAT directory ready

[2/3] Copying batch files to C:\BAT...
  [OK] NWTOC.BAT
  [OK] CTONW.BAT
  [OK] UPDATE.BAT
  [OK] CHECKUPD.BAT
  [OK] STAGE.BAT
  [OK] REBOOT.BAT
[OK] All batch files installed

[3/3] Installing AUTOEXEC.BAT...
[OK] AUTOEXEC.BAT installed with MACHINE=TS-04
[OK] Network backup folder created: T:\TS-04
```

![Screenshot: Deployment Progress]
*Screenshot placeholder: DOS screen showing [OK] messages as files copy*

#### Step 6: Deployment Complete
Final screen:
```
==============================================================
Deployment Complete!
==============================================================

Machine: TS-04

The automatic update system is now installed.

What happens on next reboot:
  1. Network client starts (C:\NET\STARTNET.BAT)
  2. Software updates download automatically (NWTOC)
  3. Test data uploads automatically (CTONW)
  4. System ready for testing

==============================================================
REBOOT NOW
==============================================================

Press Ctrl+Alt+Del to reboot

After reboot, the system will be fully operational.

Press any key to continue . . .
```

![Screenshot: Deployment Complete]
*Screenshot placeholder: DOS screen showing "Deployment Complete!" message*

#### Step 7: Reboot
**Press Ctrl+Alt+Del to reboot**

After reboot:
- Network starts automatically (STARTNET.BAT)
- Updates download automatically (NWTOC.BAT)
- MENUX test menu loads
- Select module type from menu to begin testing
- No manual commands needed!

---

### Verifying Deployment Successful

**After reboot, check for:**

1. **Network drives mapped:**
   ```
   DIR T:\
   DIR X:\
   ```
   Both should work without errors

2. **Batch files installed:**
   ```
   DIR C:\BAT
   ```
   You should see: NWTOC.BAT, CTONW.BAT, UPDATE.BAT, etc.

3. **Machine name set:**
   ```
   ECHO %MACHINE%
   ```
   Should show: `TS-04` (or your machine number)

4. **Automatic updates ran:**
   - Boot screen showed "Checking for software updates..."
   - Boot screen showed "Uploading test data to network..."
   - Both completed with [OK] messages

**If all checks pass: Deployment successful!** [OK]

---

## Understanding the Boot Process

### What Each Component Does

#### AUTOEXEC.BAT
- **Location:** C:\AUTOEXEC.BAT
- **Runs:** Every boot (automatically)
- **Purpose:** Machine startup configuration
- **What it does:**
  1. Sets machine identity (MACHINE=TS-04)
  2. Sets DOS path and environment
  3. Starts network client
  4. Calls NWTOC (download updates)
  5. Calls CTONW (upload test data)
  6. Displays "System Ready"

**You never need to edit or run this manually.**

---

#### NWTOC.BAT (Network to Computer)
- **Location:** C:\BAT\NWTOC.BAT
- **Runs:** Automatically during boot (called by AUTOEXEC.BAT)
- **Purpose:** Download software updates from network
- **What it downloads:**
  - Batch files: T:\COMMON\ProdSW → C:\BAT
  - Programs/Config: T:\TS-XX\ProdSW → C:\ATE
  - System files: T:\COMMON\DOS → C:\ (staged for reboot)

**Manual use:** Only if you need updates without rebooting (see [Manual Operations](#manual-operations))

---

#### CTONW.BAT (Computer to Network)
- **Location:** C:\BAT\CTONW.BAT
- **Runs:** Automatically during boot (called by AUTOEXEC.BAT)
- **Purpose:** Upload test data and local changes to network
- **What it uploads:**
  - Batch files: C:\BAT → T:\TS-XX\ProdSW
  - Programs: C:\ATE → T:\TS-XX\ProdSW
  - Test data: C:\ATE\*DATA → T:\TS-XX\LOGS (for database import)

**Manual use:** If you need to upload data without rebooting

---

#### UPDATE.BAT
- **Location 1:** T:\UPDATE.BAT (network shortcut)
- **Location 2:** C:\BAT\UPDATE.BAT (backup utility)
- **Purpose:** Two different functions depending on location

**T:\UPDATE.BAT (Deployment):**
- Runs DEPLOY.BAT for initial setup
- Usage: `T:\UPDATE.BAT TS-04`
- Use once per machine (initial deployment)

**C:\BAT\UPDATE.BAT (Backup):**
- Creates full system backup to T:\TS-XX\BACKUP
- Usage: `C:\BAT\UPDATE.BAT`
- Use before major changes

---

#### CHECKUPD.BAT
- **Location:** C:\BAT\CHECKUPD.BAT
- **Purpose:** Check what updates are available without downloading
- **Usage:** `C:\BAT\CHECKUPD`
- **Shows:**
  - Available batch file updates
  - Available system file updates (AUTOEXEC.NEW, CONFIG.NEW)
  - Available machine-specific updates

**Use this to see what will download on next reboot.**

---

#### STAGE.BAT & REBOOT.BAT
- **Location:** C:\BAT\STAGE.BAT, C:\BAT\REBOOT.BAT
- **Purpose:** Apply system file updates (AUTOEXEC.BAT, CONFIG.SYS)
- **When used:** Automatically when AUTOEXEC.NEW or CONFIG.NEW detected

**Process:**
1. NWTOC finds AUTOEXEC.NEW on network
2. NWTOC calls STAGE.BAT
3. STAGE.BAT creates REBOOT.BAT
4. Screen prompts: "Reboot required"
5. You run: `C:\BAT\REBOOT.BAT`
6. System reboots
7. REBOOT.BAT applies new AUTOEXEC.BAT
8. New configuration active

---

## Manual Operations

### When Manual Operations Needed

**Normally:** No manual operations required (automatic updates handle everything)

**Manual operations needed when:**
- Urgent update can't wait for reboot
- Testing new batch file immediately
- Checking for available updates
- Troubleshooting update issues
- Creating full system backup

---

### Manual Update Check

**To see what updates are available:**

```
C:\BAT\CHECKUPD
```

**Output shows:**
```
==============================================================
Update Check: TS-04 from Network
==============================================================

[1/3] Checking T:\COMMON\ProdSW for updates...
      [FOUND] 2 newer batch files available:
        NWTOC.BAT (2026-01-19 vs 2026-01-15)
        CTONW.BAT (2026-01-19 vs 2026-01-15)

[2/3] Checking T:\TS-04\ProdSW for machine-specific updates...
      [SKIP] No machine-specific directory

[3/3] Checking for system file updates...
      [OK] No system file updates

==============================================================
Summary: 2 updates available
==============================================================

To download updates: C:\BAT\NWTOC
Or wait for next reboot (automatic download)
```

![Screenshot: CHECKUPD Output]
*Screenshot placeholder: DOS screen showing CHECKUPD results with 2 updates available*

---

### Manual Update Download

**To download updates immediately (without rebooting):**

```
C:\BAT\NWTOC
```

**What happens:**
- Downloads all available updates
- Creates .BAK backups of replaced files
- Updates ready to use immediately
- No reboot required (unless system files)

**When to use:**
- Engineer says "urgent update available"
- Need new feature immediately
- Troubleshooting batch file issue

![Screenshot: Manual NWTOC]
*Screenshot placeholder: DOS screen showing NWTOC downloading updates manually*

---

### Manual Data Upload

**To upload test data immediately (without rebooting):**

```
C:\BAT\CTONW
```

**What happens:**
- Uploads batch files from C:\BAT
- Uploads programs from C:\ATE
- Uploads test data (.DAT files) to LOGS

**When to use:**
- Just finished test run
- Need data in database immediately
- Sharing modified batch file with engineering

---

### Manual Full Backup

**To create complete system backup:**

```
C:\BAT\UPDATE
```

**What it backs up:**
- C:\BAT\* → T:\TS-XX\BACKUP\BAT\
- C:\ATE\* → T:\TS-XX\BACKUP\ATE\
- C:\AUTOEXEC.BAT → T:\TS-XX\BACKUP\
- C:\CONFIG.SYS → T:\TS-XX\BACKUP\

**When to use:**
- Before major system changes
- Before deploying new AUTOEXEC.BAT
- Monthly backup routine
- Before reformatting machine

**Backup location:** `T:\TS-04\BACKUP\` (or your machine number)

---

### Applying System File Updates

**If you see message: "Reboot required for system updates"**

**Steps:**

1. **Save your work** (close all programs)

2. **Run reboot script:**
   ```
   C:\BAT\REBOOT
   ```

3. **Watch the screen during reboot:**
   - You'll see: "Applying system updates..."
   - REBOOT.BAT copies staged files
   - System reboots again automatically

4. **After second reboot:**
   - New AUTOEXEC.BAT or CONFIG.SYS active
   - System ready for testing

**Don't worry if you see two reboots - this is normal for system file updates.**

---

## Troubleshooting

### Network Not Available

**Symptom:**
- Error: "T: drive not available"
- Error: "Invalid drive specification"
- Network drives not mapped

**Solution:**

#### Step 1: Check Network Cable
- Verify Ethernet cable connected
- Check for link light on network port

#### Step 2: Restart Network Client
```
C:\NET\STARTNET
```

Wait 30 seconds, then try:
```
DIR T:\
```

#### Step 3: Check T: Drive Mapping
```
NET USE
```

Should show:
```
T: \\D2TESTNAS\test
X: \\D2TESTNAS\datasheets
```

If missing, network start failed. Contact IT.

---

### Updates Not Downloading

**Symptom:**
- Boot shows: "[OK] No new batch files in COMMON"
- But engineer says updates were deployed

**Possible Causes:**

#### Cause 1: Updates Not Synced Yet
**Solution:** Wait 15-20 minutes, then reboot again

Engineers place files on AD2, which syncs to NAS every 15 minutes. If you reboot too soon, NAS doesn't have new files yet.

#### Cause 2: DOS Clock is Wrong
Check date/time:
```
DATE
TIME
```

If DOS clock is in the future, XCOPY thinks network files are "older" and skips them.

**Solution:** Set correct date/time:
```
DATE 01-19-2026
TIME 14:30:00
```

Then reboot or run:
```
C:\BAT\NWTOC
```

#### Cause 3: Files in Wrong Location
Verify file exists on network:
```
DIR T:\COMMON\ProdSW\FILENAME.BAT
```

If missing, contact engineering - file not synced or wrong location.

---

### Boot Takes Too Long

**Symptom:**
- Boot process takes 5+ minutes
- Machine seems stuck

**Normal boot time:** 2-3 minutes

**If longer:**

#### Step 1: Check Network Status
During boot, watch for:
```
Starting network client...
```

If this hangs for minutes:
- Network issue (cable, switch, NAS down)
- Press Ctrl+C to skip network start
- Contact IT

#### Step 2: Check Update Status
If stuck at:
```
Checking for software updates...
```

Possible causes:
- Large files downloading (be patient)
- Network congestion (wait or reboot later)
- T: drive issue (see [Network Not Available](#network-not-available))

#### Step 3: Skip Automatic Updates (Emergency Only)
If you need to bypass auto-updates to start testing:

**Edit AUTOEXEC.BAT temporarily:**
```
EDIT C:\AUTOEXEC.BAT
```

**Comment out NWTOC and CTONW lines:**
```batch
REM Temporarily disabled for troubleshooting:
REM IF EXIST C:\BAT\NWTOC.BAT CALL C:\BAT\NWTOC.BAT
REM IF EXIST C:\BAT\CTONW.BAT CALL C:\BAT\CTONW.BAT
```

**Save and reboot**

**Important:** This is temporary only. Contact engineering to fix root cause.

---

### "Invalid Path" or "File Not Found" Errors

**Symptom:**
- Batch file shows errors during execution
- References to "NUL" in error messages

**Cause:** Old batch file version (pre-DOS 6.22 compatibility fix)

**Solution:**
1. Ask engineering to verify latest files deployed
2. Force update:
   ```
   DEL C:\BAT\*.BAT
   C:\NET\STARTNET
   T:\COMMON\ProdSW\DEPLOY.BAT TS-XX
   ```
3. Reboot

---

### Machine Name Not Set

**Symptom:**
- CTONW shows: "[ERROR] MACHINE variable not set"
- ECHO %MACHINE% shows nothing

**Cause:** Deployment never completed or AUTOEXEC.BAT corrupted

**Solution:**
Run deployment again:
```
T:\UPDATE.BAT TS-04
```

**This re-installs AUTOEXEC.BAT with correct machine name.**

---

### Disk Full

**Symptom:**
- Error: "Insufficient disk space"
- DIR C:\ shows 0 bytes free

**Causes:**
- .BAK backup files accumulating
- Test data files in C:\ATE
- Log files growing

**Solution:**

#### Clean Backup Files:
```
DEL C:\BAT\*.BAK
```

#### Clean Test Data:
```
DEL C:\ATE\8BDATA\*.DAT
DEL C:\ATE\DSCDATA\*.DAT
DEL C:\ATE\HVDATA\*.DAT
```
(After uploading to network!)

#### Check Disk Space:
```
DIR C:\
```

Should show several MB free.

---

### Test Data Not Uploading

**Symptom:**
- CTONW completes but data not in database
- Engineers report missing test data

**Check Upload Location:**

Data goes to: `T:\TS-XX\LOGS\` (not T:\TS-XX\ProdSW\)

**Verify manually:**
```
DIR T:\TS-04\LOGS\8BLOG\
```

Should show your .DAT files.

**If empty:**
- Check source: `DIR C:\ATE\8BDATA\*.DAT`
- If source empty, no data to upload
- If source has data, run `C:\BAT\CTONW` again

---

## FAQ

### Q: Do I need to run any commands after booting?

**A:** No! The system handles everything automatically. Just wait for "System Ready" and start testing.

---

### Q: How do I know if updates downloaded?

**A:** Watch the boot screen. You'll see:
```
[1/4] Updating batch files from T:\COMMON\ProdSW...
      [OK] Batch files updated from COMMON
```

Or run: `C:\BAT\CHECKUPD` to see available updates.

---

### Q: Can I turn off automatic updates?

**A:** Not recommended. Automatic updates ensure you always have the latest software.

If you must disable temporarily (for troubleshooting), see [Boot Takes Too Long - Step 3](#boot-takes-too-long).

---

### Q: What if I make a mistake during testing?

**A:** Reboot the machine. NWTOC will restore original files from network.

Or manually restore from backup:
```
COPY C:\BAT\FILENAME.BAK C:\BAT\FILENAME.BAT
```

---

### Q: How do I get help?

**A:**
1. Check this guide first
2. Ask test lead
3. Contact engineering
4. Email IT support

**For emergencies:** Call IT hotline

---

### Q: Can I modify batch files on the DOS machine?

**A:** You can, but changes will be lost on next reboot (NWTOC overwrites).

**To make permanent changes:**
1. Tell engineering what you need
2. They update file on AD2
3. File syncs to NAS
4. Next reboot downloads new version

---

### Q: What's the difference between UPDATE.BAT locations?

**A:**

**T:\UPDATE.BAT** - Initial deployment command
- Usage: `T:\UPDATE.BAT TS-04`
- Run once per machine (first time setup)

**C:\BAT\UPDATE.BAT** - Full backup command
- Usage: `C:\BAT\UPDATE`
- Run before major changes

Same name, different purposes!

---

### Q: Why does boot take longer than before?

**A:** Automatic updates add 30-60 seconds to boot time.

**Before:** ~60 seconds (just network start)
**Now:** ~150 seconds (network + updates + upload)

**Trade-off:** Slower boot, but no manual commands needed.

Net result: Faster testing start (no waiting for you to run commands).

---

### Q: What are .BAK files in C:\BAT?

**A:** Backup files created by NWTOC before overwriting.

**Safe to delete:** Yes (after verifying updates work)

**Useful for:** Rollback to previous version if needed

**Cleanup:**
```
DEL C:\BAT\*.BAK
```

---

### Q: Do I need to deploy every machine individually?

**A:** Yes, but only once per machine.

**After initial deployment:** All machines update automatically on reboot.

**Deployment checklist:**
- [ ] TS-01 deployed
- [ ] TS-02 deployed
- ...
- [ ] TS-30 deployed

---

## Quick Reference Card

### Daily Operations
```
Boot machine → Wait for "System Ready" → Start testing
```

### First Time Setup
```
T:\UPDATE.BAT TS-XX → Reboot → Done
```

### Manual Commands
```
C:\BAT\CHECKUPD  - Check available updates
C:\BAT\NWTOC     - Download updates now
C:\BAT\CTONW     - Upload test data now
C:\BAT\UPDATE    - Full system backup
```

### Troubleshooting
```
C:\NET\STARTNET  - Restart network
DATE             - Check DOS date
TIME             - Check DOS time
DIR T:\          - Verify network access
ECHO %MACHINE%   - Check machine name
```

### Emergency Contacts
```
Test Lead: [Contact]
Engineering: [Contact]
IT Support: [Contact]
```

---

**Document End**

*For detailed technical information, see ENGINEER_CHANGELOG.md*
*For advanced procedures, see ENGINEER_HOWTO_GUIDE.md*

**Remember:** When in doubt, reboot! The automatic system will restore everything.
