Files
claudetools/docs/ENGINEER_HOWTO_GUIDE.md
Mike Swanson 29e2df60c5 feat: Complete DOS machine deployment verification and AD2-NAS sync infrastructure
This checkpoint establishes verified deployment infrastructure for the Dataforth
DOS Update System with proper file synchronization and documentation.

## Key Changes

### TS-4R Backup and Analysis
- Backed up complete TS-4R machine to D:\ClaudeTools\backups\TS-4R\
- Analyzed MENUX.EXE startup menu system (758-line QuickBasic program)
- Documented complete startup sequence: AUTOEXEC.BAT → STARTNET.BAT → MENUX.EXE
- Found MENUX.BAS source code (Feb 2008 version) from KEPCO ABC software archive

### AD2-NAS Sync Infrastructure Fixes
- Created junction: COMMON → _COMMON (single source of truth for software updates)
- Verified bidirectional sync logic prevents data backflow:
  * Test data: DOS → NAS → AD2 → Database (one-way, deleted from NAS)
  * Program updates: AD2 → NAS → DOS (one-way, files remain on AD2)
- Manually deployed correct BAT file versions to NAS after sync connection issues
- Verified all 9 BAT files deployed correctly (5.1KB-8.8KB each)

### Deployment Scripts Created
- check-junction.ps1: Verify COMMON/\_COMMON junction status
- compare-common-folders.ps1: Compare folder contents
- deploy-correct-bat-files.ps1: Deploy BAT files from local to AD2
- fix-common-junction.ps1: Create COMMON → _COMMON junction
- verify-bat-deployment.ps1: Verify file versions on AD2
- manual-push-to-nas.sh: Manual BAT file deployment to NAS
- read-sync-script.ps1: Read Sync-FromNAS.ps1 from AD2
- search-menux-ad2.ps1: Search for MENUX source files

### Documentation Updates
- Updated all deployment guides with MENUX startup sequence
- Added startup flow to credentials.md and session logs
- Documented junction requirement for COMMON/\_COMMON
- Added data flow verification confirming unidirectional sync

## Technical Details

**Files Deployed to NAS (2026-01-20 09:01-09:02):**
- UPDATE.BAT (5,181 bytes) - Machine backup utility
- DEPLOY.BAT (5,579 bytes) - One-time deployment installer
- NWTOC.BAT (6,305 bytes) - Network to Computer updates
- CTONW.BAT (7,831 bytes) - Computer to Network uploads
- CTONWTXT.BAT (1,504 bytes) - Text file version
- CHECKUPD.BAT (6,495 bytes) - Check for updates
- STAGE.BAT (8,794 bytes) - Stage system files
- REBOOT.BAT (5,099 bytes) - Apply staged updates
- AUTOEXEC.BAT (2,211 bytes) - DOS startup configuration

**Sync Logic Verified:**
- PULL: /data/test/TS-*/LOGS/*.DAT copied to AD2, then deleted from NAS
- PUSH: C:\Shares\test\_COMMON\ProdSW\* copied to /data/test/COMMON/ProdSW/
- No reverse flow in either direction (test data never returns to DOS)

**Junction Created:**
- Target: C:\Shares\test\COMMON → C:\Shares\test\_COMMON
- Eliminates duplicate file maintenance
- Backup saved to C:\Shares\test\COMMON.backup

## Files Modified
- DOS_DEPLOYMENT_GUIDE.md: Added automatic startup sequence
- docs/DEPLOYMENT_GUIDE.md: Updated post-reboot expectations
- docs/ENGINEER_HOWTO_GUIDE.md: Added MENUX menu loading step
- credentials.md: Documented startup sequence and MENUX interface
- session-logs/2026-01-19-session.md: Added startup documentation

## Files Added
- 8 PowerShell deployment/verification scripts
- 3 HTML documentation exports
- TS-4R complete backup (not committed to git)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-20 16:03:00 -07:00

27 KiB

DOS Update System - Engineer How-To Guide

Document Version: 1.0 Date: January 19, 2026 Audience: Engineers and System Administrators Prerequisites: Network access to \AD2\test\ share


Table of Contents

  1. Quick Start
  2. Accessing the Test Share
  3. File Placement Guide
  4. Sync Process Explained
  5. Update Workflow
  6. Troubleshooting Guide
  7. Best Practices
  8. FAQ

Quick Start

Need to deploy a software update quickly? Follow these steps:

  1. Map network drive to \\AD2\test (if not already mapped)
  2. Copy batch files to: \\AD2\test\COMMON\ProdSW\
  3. Wait 15 minutes for automatic sync to NAS
  4. DOS machines will download updates on next reboot

That's it! No manual commands needed on DOS machines.


Accessing the Test Share

Engineers have share-level access to AD2's test folder via SMB.

Windows File Explorer:

  1. Open File Explorer
  2. Click "This PC" in left sidebar
  3. Click "Map network drive" button (or right-click → "Map network drive")
  4. Choose drive letter: T: (recommended for consistency)
  5. Enter path: \\AD2\test
  6. Check "Reconnect at sign-in" (optional)
  7. Click "Finish"
  8. Enter credentials if prompted:
    • Username: INTRANET\[your-username]
    • Password: [your-password]

Command Line (cmd.exe):

net use T: \\AD2\test /persistent:yes

PowerShell:

New-PSDrive -Name "T" -PSProvider FileSystem -Root "\\AD2\test" -Persist

![Screenshot: Map Network Drive Dialog] Screenshot placeholder: Windows "Map network drive" dialog showing \AD2\test path


Option 2: Direct UNC Path

If you don't want to map a drive, use the UNC path directly:

Windows File Explorer:

  • Navigate to: \\AD2\test\COMMON\ProdSW\
  • Drag and drop files directly

Command Line:

copy C:\MyFiles\*.BAT \\AD2\test\COMMON\ProdSW\

PowerShell:

Copy-Item C:\MyFiles\*.BAT -Destination \\AD2\test\COMMON\ProdSW\

Verifying Access

Check if you have access:

  1. Open File Explorer
  2. Navigate to: \\AD2\test\
  3. You should see folders: COMMON, TS-01, TS-02, ..., TS-30

Expected folder structure:

\\AD2\test\
├── COMMON\
│   ├── ProdSW\      ← Place batch files here
│   ├── DOS\         ← System files (AUTOEXEC.NEW, CONFIG.NEW)
│   └── NET\         ← Network client updates
├── TS-01\           ← Machine-specific folders
├── TS-02\
├── ...
└── TS-30\

![Screenshot: Test Share Folder Structure] Screenshot placeholder: Windows Explorer showing \AD2\test\ folder structure with COMMON and TS-XX folders


File Placement Guide

Where to Place Files

File Type Destination Scope Auto-Deployed To
Batch files (.BAT) \\AD2\test\COMMON\ProdSW\ All machines C:\BAT\ on all DOS machines
Executables (.EXE) \\AD2\test\COMMON\ProdSW\ All machines C:\ATE\ on all DOS machines
Config files (.CFG) \\AD2\test\COMMON\ProdSW\ All machines C:\ATE\ on all DOS machines
System files (AUTOEXEC.NEW) \\AD2\test\COMMON\DOS\ All machines Staged for reboot
Network client files \\AD2\test\COMMON\NET\ All machines C:\NET\ on all DOS machines
Machine-specific files \\AD2\test\TS-XX\ProdSW\ Single machine C:\BAT\ and C:\ATE\ on specific machine

Step-by-Step: Deploy Batch File Update

Scenario: You've updated CHECKUPD.BAT and need to deploy it to all machines.

Steps:

  1. Access the share:

    \\AD2\test\COMMON\ProdSW\
    
  2. Backup existing file (optional but recommended):

    • Rename CHECKUPD.BAT to CHECKUPD.BAK
    • Or copy to _backup\ folder
  3. Copy new file:

    • Drag your updated CHECKUPD.BAT to \\AD2\test\COMMON\ProdSW\
    • Overwrite when prompted
  4. Verify copy:

    • Check file size and timestamp match your source file
    • Open file to verify contents (right-click → Edit)
  5. Wait for sync:

    • AD2 syncs to NAS every 15 minutes
    • After 15 minutes, file is available at T:\COMMON\ProdSW\ on DOS machines
  6. Verify on DOS machine:

    • Next reboot: NWTOC downloads new file to C:\BAT\
    • Or manually run: T:\COMMON\ProdSW\NWTOC.BAT on DOS machine

![Screenshot: File Copy Operation] *Screenshot placeholder: Windows Explorer copying CHECKUPD.BAT to \AD2\test\COMMON\ProdSW*


Step-by-Step: Deploy Machine-Specific Update

Scenario: TS-04 needs a special configuration file.

Steps:

  1. Identify target machine folder:

    \\AD2\test\TS-04\ProdSW\
    
  2. Create folder if it doesn't exist:

    • Right-click in \\AD2\test\TS-04\
    • Select "New" → "Folder"
    • Name it: ProdSW
  3. Copy machine-specific file:

    • Drag your file to \\AD2\test\TS-04\ProdSW\
  4. Wait for sync (15 minutes)

  5. On TS-04 DOS machine:

    • Reboot machine
    • NWTOC automatically downloads from T:\TS-04\ProdSW\ to C:\BAT\ and C:\ATE\

Important: Machine-specific files take precedence over COMMON files.


Sync Process Explained

How Sync Works

┌─────────────────────────────────────────────────────────────────┐
│ Step 1: Engineer places file on AD2                            │
│ Location: \\AD2\test\COMMON\ProdSW\NEWFILE.BAT                 │
│ Time: 0 minutes                                                 │
└─────────────────────────────────────────────────────────────────┘
                           │
                           ▼
┌─────────────────────────────────────────────────────────────────┐
│ Step 2: Scheduled task on AD2 syncs to NAS                     │
│ Frequency: Every 15 minutes                                     │
│ Time: 0-15 minutes (depending on timing)                        │
└─────────────────────────────────────────────────────────────────┘
                           │
                           ▼
┌─────────────────────────────────────────────────────────────────┐
│ Step 3: File now available on D2TESTNAS                        │
│ Location: /data/test/COMMON/ProdSW/NEWFILE.BAT                 │
│ DOS Access: T:\COMMON\ProdSW\NEWFILE.BAT                       │
│ Time: 15 minutes (maximum)                                      │
└─────────────────────────────────────────────────────────────────┘
                           │
                           ▼
┌─────────────────────────────────────────────────────────────────┐
│ Step 4: DOS machine reboots and runs NWTOC                     │
│ NWTOC downloads: T:\COMMON\ProdSW\*.BAT → C:\BAT\              │
│ Time: Next reboot (or manual NWTOC.BAT execution)              │
└─────────────────────────────────────────────────────────────────┘
                           │
                           ▼
┌─────────────────────────────────────────────────────────────────┐
│ Step 5: File now deployed on DOS machine                       │
│ Location: C:\BAT\NEWFILE.BAT                                   │
│ Status: Ready to use                                            │
└─────────────────────────────────────────────────────────────────┘

Sync Timing

Action Time Required Notes
File copy to AD2 Instant Limited by network speed
AD2 → NAS sync 0-15 minutes Depends on scheduled task timing
NAS → DOS machine Next reboot Or manual NWTOC execution
Total deployment time 15 min - 24 hours Depends on reboot schedule

Pro Tip: For urgent updates, ask test staff to reboot specific machines or manually run NWTOC.


Verifying Sync Status

Check if file reached NAS:

  1. Via DOS machine:

    • Log into any DOS machine
    • Type: DIR T:\COMMON\ProdSW\YOURFILE.BAT
    • If listed, sync complete
  2. Via SSH (if you have access):

    ssh admin@192.168.0.9
    ls -lh /data/test/COMMON/ProdSW/
    
  3. Via test staff:

    • Ask them to check T: drive on DOS machine
    • Faster than waiting 15 minutes

Update Workflow

Normal Update Process (Automatic)

For Test Staff - No manual steps required:

  1. Engineer places file on AD2
  2. File syncs to NAS (15 minutes)
  3. DOS machine reboots
  4. AUTOEXEC.BAT runs automatically:
    • Network starts (STARTNET.BAT)
    • NWTOC downloads updates from T:\COMMON\ProdSW
    • NWTOC downloads machine-specific updates from T:\TS-XX\ProdSW
    • CTONW uploads test data to T:\TS-XX\LOGS
    • MENUX test menu loads (C:\ATE\MENUX.EXE)
  5. System ready for testing - test staff selects module type from menu

No intervention required from test staff.


Expedited Update Process (Manual)

For urgent updates that can't wait for reboot:

  1. Engineer places file on AD2
  2. Wait 15 minutes for sync to NAS
  3. Ask test staff to run on DOS machine:
    C:\BAT\NWTOC.BAT
    
  4. Updates downloaded immediately
  5. No reboot required

System File Updates (AUTOEXEC.BAT, CONFIG.SYS)

These require reboot and special handling:

  1. Create staged files:

    • Rename to: AUTOEXEC.NEW or CONFIG.NEW
    • Place in: \\AD2\test\COMMON\DOS\
  2. Wait for sync (15 minutes)

  3. On DOS machine reboot:

    • NWTOC detects .NEW files
    • Calls STAGE.BAT automatically
    • Creates REBOOT.BAT
    • Displays message: "Reboot required"
  4. Test staff runs:

    C:\BAT\REBOOT.BAT
    
    • System reboots
    • REBOOT.BAT applies staged files
    • New AUTOEXEC.BAT/CONFIG.SYS active after reboot

Warning: System file updates require careful testing. Always test on one machine first.


Troubleshooting Guide

Issue 1: Cannot Access \AD2\test\

Symptom:

  • "Network path not found" error
  • "Access denied" error
  • Unable to map drive

Possible Causes & Solutions:

Cause 1: Not on VPN

Solution:

  • Connect to company VPN
  • Verify VPN connection active
  • Retry access

Cause 2: Incorrect Credentials

Solution:

  • Use format: INTRANET\username
  • Verify password is correct
  • Try: Control Panel → Credential Manager → Windows Credentials → Add

Cause 3: AD2 Server Down

Solution:

  • Ping: ping 192.168.0.6
  • If no response, contact IT
  • Check with colleagues if they can access

Cause 4: SMB Version Mismatch

Solution:

  • Enable SMB1 on your Windows machine (if required):
    Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
    
  • Reboot after enabling
  • Retry access

![Screenshot: Network Path Not Found Error] Screenshot placeholder: Windows error dialog showing "\AD2\test is not accessible"


Issue 2: File Copied but DOS Machine Not Updated

Symptom:

  • File placed on \AD2\test\COMMON\ProdSW\
  • DOS machine still has old version after reboot

Troubleshooting Steps:

Step 1: Verify File on AD2

dir \\AD2\test\COMMON\ProdSW\YOURFILE.BAT
  • Check file size and timestamp
  • Verify it matches your source file

Step 2: Wait for Sync (15 minutes)

  • Sync runs every 15 minutes
  • Check clock - has 15 minutes elapsed since you copied?

Step 3: Verify File on NAS (via DOS)

On DOS machine:

DIR T:\COMMON\ProdSW\YOURFILE.BAT
  • If missing: Sync hasn't completed or sync process failed
  • If present: Continue to Step 4

Step 4: Check DOS Machine Date/Time

NWTOC uses /D flag (only copy if newer):

XCOPY T:\COMMON\ProdSW\*.bat C:\BAT\ /D /Y

On DOS machine:

DATE
TIME
  • If DOS clock is in the future, XCOPY won't copy "older" files
  • Solution: Set correct date/time on DOS machine

Step 5: Force Update

On DOS machine, bypass date check:

DEL C:\BAT\YOURFILE.BAT
C:\BAT\NWTOC.BAT
  • This forces re-download

Step 6: Check NWTOC Error Messages

Run NWTOC manually and watch for errors:

C:\BAT\NWTOC.BAT

Look for:

  • [ERROR] T: drive not available
  • [ERROR] Update initialization failed
  • [ERROR] Update terminated by user

Issue 3: Sync Not Happening (15+ Minutes Elapsed)

Symptom:

  • File on AD2, but not appearing on NAS after 15+ minutes
  • DIR T:\COMMON\ProdSW\ on DOS shows old file

Troubleshooting Steps:

Step 1: Verify Scheduled Task on AD2

If you have SSH access to AD2:

ssh INTRANET\sysadmin@192.168.0.6
Get-ScheduledTask | Where-Object {$_.TaskName -like "*sync*"}
  • Look for task that syncs to NAS
  • Check: State = "Ready", LastRunTime recent

If task not running:

Start-ScheduledTask -TaskName "SyncToNAS"

Step 2: Check NAS Accessibility from AD2

If you have SSH access to AD2:

ping 192.168.0.9
net use \\192.168.0.9\test
  • If ping fails: NAS is down or network issue
  • If net use fails: SMB1 issue or credentials

Step 3: Manually Trigger Sync

Contact IT to manually run sync script on AD2

Step 4: Verify NAS is Online

ping 192.168.0.9
  • If no response: NAS is down, contact IT

Issue 4: "Invalid Path" Error on DOS Machine

Symptom:

  • DOS displays: "Invalid path" or "File not found"
  • NWTOC or CTONW fails with path errors

Possible Causes:

Cause 1: Using NUL Device Name

Old code (incorrect):

IF NOT EXIST C:\BAT\NUL MD C:\BAT

New code (correct):

IF NOT EXIST C:\BAT\*.* MD C:\BAT

Solution:

  • Verify batch files are latest version (with DOS 6.22 compatibility fixes)
  • Replace old batch files with new versions
  • Check file timestamp: Should be 2026-01-19 or later

Cause 2: Long File Paths

DOS 6.22 has 128-character path limit: Solution:

  • Use shorter path names
  • Avoid deeply nested directories

Cause 3: Special Characters in Filenames

DOS doesn't support: | < > / \ : " * ? Solution:

  • Rename files to use only: A-Z, 0-9, dash, underscore
  • Follow 8.3 naming convention

Issue 5: DEPLOY.BAT Fails on DOS Machine

Symptom:

  • Running: T:\UPDATE.BAT TS-XX fails
  • Error messages during deployment

Troubleshooting Steps:

Step 1: Verify Machine Name Argument

T:\UPDATE.BAT TS-04
  • Machine name must be provided
  • Must match network folder: T:\TS-04\

Step 2: Verify DEPLOY.BAT Exists

DIR T:\COMMON\ProdSW\DEPLOY.BAT
  • If missing, files not synced yet

Step 3: Verify Template AUTOEXEC.BAT Exists

DIR T:\COMMON\ProdSW\AUTOEXEC.BAT
  • DEPLOY copies this as template
  • If missing, deployment will fail

Step 4: Check C: Drive Space

DIR C:\
  • DEPLOY creates C:\BAT\ and copies files
  • Requires ~500 KB free space minimum

Step 5: Run with Output Visible

T:\COMMON\ProdSW\DEPLOY.BAT TS-04
  • Watch each step
  • Note exactly where it fails
  • Check error messages

Common Errors:

  • [ERROR] Machine name not provided → Missing argument
  • [ERROR] Could not create C:\BAT directory → Disk full or permissions
  • [ERROR] Failed to copy files from network → T: drive issue
  • [ERROR] Could not copy AUTOEXEC.BAT template → Template missing

Issue 6: System Files Not Updating (AUTOEXEC.BAT)

Symptom:

  • Placed AUTOEXEC.NEW in \AD2\test\COMMON\DOS\
  • DOS machine not showing staged update

Troubleshooting Steps:

Step 1: Verify File Placement

Correct location:

\\AD2\test\COMMON\DOS\AUTOEXEC.NEW

Not:

\\AD2\test\COMMON\ProdSW\AUTOEXEC.NEW  (wrong!)

Step 2: Verify File Extension

Must be .NEW:

AUTOEXEC.NEW   (correct)
AUTOEXEC.BAT   (wrong - will be ignored)

Step 3: Wait for Sync + Reboot

  • File must sync to NAS (15 minutes)
  • DOS machine must reboot
  • NWTOC runs and detects .NEW file

Step 4: Check for STAGE.BAT

On DOS machine:

DIR C:\BAT\STAGE.BAT
  • If missing, NWTOC cannot stage updates
  • Solution: Deploy STAGE.BAT to COMMON\ProdSW first

Step 5: Check for Staged Files

After reboot, on DOS machine:

DIR C:\AUTOEXEC.NEW
DIR C:\CONFIG.NEW
  • If present: Staging worked, need to run REBOOT.BAT
  • If missing: NWTOC didn't detect or staging failed

Step 6: Manual Staging

If automatic staging failed:

COPY T:\COMMON\DOS\AUTOEXEC.NEW C:\AUTOEXEC.NEW
C:\BAT\STAGE.BAT

Issue 7: CTONW Upload Fails

Symptom:

  • Test staff reports CTONW errors
  • Test data not reaching T:\TS-XX\LOGS

Troubleshooting Steps:

Step 1: Verify MACHINE Variable

On DOS machine:

ECHO %MACHINE%
  • Should show: TS-04 (or correct machine name)
  • If blank: AUTOEXEC.BAT SET MACHINE not set
  • Solution: Run DEPLOY.BAT again

Step 2: Verify Target Folder Exists

On DOS machine:

DIR T:\TS-04\
  • If missing: CTONW will create it
  • If "Access denied": Permission issue on NAS

Step 3: Check Source Data

On DOS machine:

DIR C:\ATE\8BDATA\*.DAT
  • If no .DAT files, nothing to upload
  • CTONW only uploads .DAT files to LOGS

Step 4: Run CTONW with Visible Output

C:\BAT\CTONW.BAT
  • Watch for error messages
  • Check which step fails

Common Errors:

  • [ERROR] MACHINE variable not set → Run DEPLOY.BAT
  • [ERROR] T: drive not available → Network down
  • [ERROR] Could not create target directory → NAS permission issue
  • [ERROR] Upload initialization failed → Memory or path issue

Issue 8: Network Drive (T:) Not Mapped

Symptom:

  • DOS machine shows: [ERROR] T: drive not available
  • Cannot access T:\

Troubleshooting Steps:

Step 1: Check Network Stack

On DOS machine:

NET
  • Should show Microsoft Network Client loaded
  • If "Bad command or file name": Network not started

Step 2: Restart Network Client

C:\NET\STARTNET.BAT
  • Watch for error messages
  • Should map T: and X: drives

Step 3: Verify T: Drive After Network Start

DIR T:\
  • Should show COMMON, TS-XX folders
  • If error: Network mapping failed

Step 4: Check NAS Accessibility

PING 192.168.0.9
  • DOS 6.22 may not have ping
  • Try: DIR T:\ instead

Step 5: Check STARTNET.BAT Configuration

EDIT C:\NET\STARTNET.BAT

Look for:

NET USE T: \\D2TESTNAS\test
  • Verify server name and share correct
  • Verify drive letter is T:

Issue 9: Backup Files Accumulating (.BAK files)

Symptom:

  • C:\BAT\ filling up with .BAK files
  • Running out of disk space on DOS machines

Explanation:

  • NWTOC creates .BAK backups before overwriting files
  • This is intentional for rollback capability

Solution:

On DOS machine:

DEL C:\BAT\*.BAK
  • Safe to delete after verifying updates work
  • Keep most recent .BAK for rollback

Option 2: Automated Cleanup

Add to AUTOEXEC.BAT (after NWTOC call):

REM Clean up backup files older than current
FOR %%F IN (C:\BAT\*.BAK) DO DEL %%F >NUL 2>NUL

Option 3: Keep Recent Backups Only

REM Keep only today's backups, delete older
DEL C:\BAT\OLDFILE1.BAK
DEL C:\BAT\OLDFILE2.BAK

Issue 10: Updates Work but Performance Slow

Symptom:

  • Updates download successfully
  • Boot process takes 5+ minutes
  • Network transfers slow

Possible Causes:

Cause 1: Network Congestion

  • Multiple DOS machines booting simultaneously
  • All downloading from NAS at once

Solution:

  • Stagger reboot times
  • Reboot in batches (5 machines at a time)

Cause 2: NAS Under Load

  • Check NAS performance
  • Verify NAS not running other intensive tasks

Solution:

  • Schedule updates during off-hours
  • Reduce concurrent connections

Cause 3: Large File Transfers

  • Check file sizes in ProdSW
  • Remove unnecessary large files

Solution:

  • Keep ProdSW lean (< 10 MB total)
  • Move large files to separate share

Best Practices

File Naming Conventions

DO:

  • Use uppercase: MYFILE.BAT
  • Follow 8.3 naming: FILENAME.EXT (8 chars + 3 char extension)
  • Use underscores: MY_FILE.BAT
  • Use dates: BACKUP_20260119.BAT

DON'T:

  • Use spaces: MY FILE.BAT (will cause issues)
  • Use special characters: FILE@#$.BAT
  • Exceed 8 characters: VERYLONGFILENAME.BAT (truncated to VERYLONG.BAT)
  • Use lowercase (DOS is case-insensitive, but uppercase is convention)

Testing Updates

Always test on one machine first:

  1. Choose test machine: TS-30 (designated test machine)
  2. Deploy to TS-30 folder first:
    \\AD2\test\TS-30\ProdSW\NEWFILE.BAT
    
  3. Wait for sync + reboot TS-30
  4. Verify functionality on TS-30
  5. If successful, deploy to COMMON:
    \\AD2\test\COMMON\ProdSW\NEWFILE.BAT
    

This prevents breaking all 30 machines with one bad update.


Backup Strategy

Before deploying updates:

  1. Copy old file to backup folder:

    \\AD2\test\COMMON\ProdSW\_backup\OLDFILE_20260119.BAK
    
  2. Create dated backup:

    • Include date in filename
    • Keep backups for 30 days
    • Delete older backups monthly
  3. Document changes:

    • Add entry to CHANGELOG.txt in ProdSW folder
    • Include: Date, File, Version, Changes, Your Name

Communication

Notify test staff before updates:

  1. Email test team:

    • Subject: "DOS Update: [File] - [Date]"
    • Include: What changed, Expected behavior, Reboot required?
  2. For urgent updates:

    • Phone call or Teams message
    • Ask them to reboot specific machines
    • Verify update successful
  3. For system file updates:

    • Always notify test lead
    • Schedule during low-activity time
    • Be available for troubleshooting

Version Control

Track versions in filenames or comments:

Option 1: Version in Filename

\\AD2\test\COMMON\ProdSW\_versions\CHECKUPD_v1.2.BAT

Option 2: Version in File Header

@ECHO OFF
REM CHECKUPD.BAT - Version 1.2
REM Last modified: 2026-01-19
REM Changes: Added error logging

Option 3: Use Git Repository

  • Maintain batch files in git
  • Tag releases: v1.2-production
  • Deploy from tagged versions

FAQ

Q: How long does it take for updates to reach DOS machines?

A:

  • AD2 → NAS sync: 0-15 minutes (scheduled task)
  • NAS → DOS machine: Next reboot (or manual NWTOC)
  • Total: 15 minutes to 24 hours (depending on reboot schedule)

For urgent updates, ask test staff to manually run NWTOC.BAT.


Q: Can I update multiple files at once?

A: Yes! Copy all files to \AD2\test\COMMON\ProdSW\ at once. They'll all sync together and download together on next NWTOC run.


Q: What happens if I overwrite a file while DOS machine is downloading?

A:

  • If AD2 → NAS sync is running: File may be partially copied, retry on next sync
  • If DOS machine is downloading: DOS gets whichever version was on NAS at start of download
  • Best practice: Deploy during off-hours when DOS machines are idle

Q: Can I delete old files from ProdSW?

A: Yes, but be careful:

  1. Verify file not referenced by any batch file
  2. Delete from AD2: \\AD2\test\COMMON\ProdSW\OLDFILE.BAT
  3. Wait for sync (15 minutes)
  4. File removed from T:\COMMON\ProdSW\ on NAS
  5. DOS machines won't download deleted file
  6. But: File remains on DOS machines in C:\BAT\ until manually deleted

To remove from DOS machines:

  • Ask test staff to: DEL C:\BAT\OLDFILE.BAT on each machine
  • Or add to cleanup script

Q: What's the difference between COMMON and machine-specific folders?

A:

COMMON (\AD2\test\COMMON\ProdSW):

  • Deployed to ALL 30 DOS machines
  • Use for: Standard batch files, shared programs
  • Example: NWTOC.BAT, CTONW.BAT, CHECKUPD.BAT

Machine-Specific (\AD2\test\TS-04\ProdSW):

  • Deployed to ONLY that specific machine
  • Use for: Custom configurations, machine-unique programs
  • Example: Special test config for TS-04

Precedence: Machine-specific files override COMMON files (downloaded second).


Q: How do I know which version is on a DOS machine?

A: Ask test staff to check:

REM Check file date/time
DIR C:\BAT\FILENAME.BAT

REM Check version in file header
TYPE C:\BAT\FILENAME.BAT | MORE

Or keep a deployment log:

\\AD2\test\COMMON\ProdSW\DEPLOYMENT_LOG.txt

Q: Can I test sync manually without waiting 15 minutes?

A: If you have SSH access to AD2, you can manually trigger sync:

ssh INTRANET\sysadmin@192.168.0.6
# Run sync script manually (command depends on AD2 configuration)

Otherwise, ask IT to manually run sync task.


Q: What if I need to rollback an update?

A:

Option 1: Restore from Backup

COPY \\AD2\test\COMMON\ProdSW\_backup\OLDFILE.BAK \\AD2\test\COMMON\ProdSW\OLDFILE.BAT

Wait 15 minutes for sync, DOS machines download old version on next reboot.

Option 2: On DOS Machine

COPY C:\BAT\OLDFILE.BAK C:\BAT\OLDFILE.BAT

Immediate rollback on that machine only.


Q: Can engineers run DEPLOY.BAT remotely?

A: No. DEPLOY.BAT must be run locally on the DOS machine:

  • Requires direct access to C:\ drive
  • Modifies AUTOEXEC.BAT on C:\
  • Cannot be run over network share

Deployment workflow:

  1. Engineer places files on AD2
  2. Wait for sync to NAS
  3. Test staff runs on DOS machine: T:\UPDATE.BAT TS-XX

Q: What files should never be modified?

A: Be very careful with:

System Files:

  • AUTOEXEC.BAT - Only update via DEPLOY.BAT or .NEW staging
  • CONFIG.SYS - Only update via .NEW staging
  • STARTNET.BAT - Network client config

Core Update Files:

  • NWTOC.BAT - Download updates (test thoroughly before deploying)
  • CTONW.BAT - Upload test data (test thoroughly)
  • DEPLOY.BAT - Deployment installer (test on TS-30 first)
  • STAGE.BAT - System file staging (critical for updates)
  • REBOOT.BAT - Auto-generated, don't modify manually

Summary

Key Takeaways:

  1. Access via: \\AD2\test\COMMON\ProdSW\
  2. Sync time: 15 minutes maximum
  3. Deployment: Automatic on reboot (or manual NWTOC)
  4. Test first: Use TS-30 or machine-specific folder
  5. Backup always: Keep old versions before updating
  6. Communicate: Notify test staff of updates

Emergency Contact:

  • IT Support: [Contact Info]
  • Test Team Lead: [Contact Info]

Document End

For change log details, see ENGINEER_CHANGELOG.md For test staff procedures, see DEPLOYMENT_GUIDE.md