Files
claudetools/docs/ENGINEER_HOWTO_GUIDE.html
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

564 lines
17 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DOS Update System - Engineer Guide</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=Raleway:wght@400;600;700;800&family=Fira+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--color-primary: #1e3a8a;
--color-secondary: #3b82f6;
--color-text: #1f2937;
--color-text-light: #4b5563;
--color-border: #d1d5db;
--color-bg-code: #f9fafb;
--color-bg-highlight: #eff6ff;
--color-warning: #fef3c7;
--color-warning-border: #fbbf24;
--font-body: 'Lora', Georgia, serif;
--font-heading: 'Raleway', -apple-system, sans-serif;
--font-mono: 'Fira Mono', 'Consolas', monospace;
}
body {
font-family: var(--font-body);
font-size: 11pt;
line-height: 1.7;
color: var(--color-text);
background: white;
max-width: 210mm;
margin: 0 auto;
padding: 20mm;
}
h1, h2, h3, h4, h5, h6 {
font-family: var(--font-heading);
font-weight: 700;
line-height: 1.3;
margin-top: 2em;
margin-bottom: 0.75em;
color: var(--color-primary);
}
h1 {
font-size: 28pt;
font-weight: 800;
margin-top: 0;
margin-bottom: 0.5em;
padding-bottom: 0.3em;
border-bottom: 3px solid var(--color-primary);
}
h2 {
font-size: 18pt;
margin-top: 1.5em;
padding-bottom: 0.2em;
border-bottom: 2px solid var(--color-border);
}
h3 {
font-size: 14pt;
color: var(--color-secondary);
}
h4 {
font-size: 12pt;
font-weight: 600;
}
p {
margin-bottom: 1em;
}
strong {
font-weight: 700;
color: var(--color-text);
}
em {
font-style: italic;
}
ul, ol {
margin-left: 1.5em;
margin-bottom: 1em;
}
li {
margin-bottom: 0.5em;
}
pre {
background: var(--color-bg-code);
border: 1px solid var(--color-border);
border-left: 4px solid var(--color-secondary);
padding: 1em;
margin: 1em 0;
overflow-x: auto;
font-family: var(--font-mono);
font-size: 9pt;
line-height: 1.5;
border-radius: 4px;
}
code {
font-family: var(--font-mono);
font-size: 9.5pt;
background: var(--color-bg-code);
padding: 0.15em 0.4em;
border-radius: 3px;
border: 1px solid #e5e7eb;
}
pre code {
background: none;
border: none;
padding: 0;
}
table {
width: 100%;
border-collapse: collapse;
margin: 1.5em 0;
font-size: 10pt;
}
th, td {
border: 1px solid var(--color-border);
padding: 0.75em;
text-align: left;
}
th {
background: var(--color-primary);
color: white;
font-family: var(--font-heading);
font-weight: 600;
}
tr:nth-child(even) {
background: var(--color-bg-code);
}
.metadata {
background: var(--color-bg-highlight);
border-left: 4px solid var(--color-secondary);
padding: 1em;
margin-bottom: 2em;
font-size: 10pt;
}
.metadata p {
margin-bottom: 0.25em;
}
.divider {
border: none;
border-top: 1px solid var(--color-border);
margin: 2em 0;
}
.note-box {
background: var(--color-warning);
border: 1px solid var(--color-warning-border);
border-left: 4px solid var(--color-warning-border);
padding: 1em;
margin: 1em 0;
border-radius: 4px;
}
.note-box p {
margin-bottom: 0;
}
.diagram {
background: var(--color-bg-code);
border: 2px solid var(--color-border);
padding: 1.5em;
margin: 1.5em 0;
font-family: var(--font-mono);
font-size: 9pt;
line-height: 1.4;
white-space: pre;
overflow-x: auto;
}
.toc {
background: var(--color-bg-code);
border: 1px solid var(--color-border);
padding: 1.5em;
margin: 2em 0;
border-radius: 4px;
}
.toc h2 {
margin-top: 0;
font-size: 14pt;
border: none;
}
.toc ol {
margin-top: 1em;
}
.toc a {
color: var(--color-secondary);
text-decoration: none;
}
.toc a:hover {
text-decoration: underline;
}
@media print {
body {
max-width: 100%;
padding: 15mm;
}
h1 {
page-break-before: auto;
page-break-after: avoid;
}
h2, h3, h4 {
page-break-after: avoid;
}
pre, table, .diagram, .note-box {
page-break-inside: avoid;
}
a {
color: inherit;
text-decoration: none;
}
.toc {
page-break-after: always;
}
@page {
margin: 20mm;
@bottom-center {
content: "Page " counter(page);
font-family: var(--font-heading);
font-size: 9pt;
color: var(--color-text-light);
}
@bottom-right {
content: "Engineer Guide";
font-family: var(--font-heading);
font-size: 8pt;
color: var(--color-text-light);
}
}
}
</style>
</head>
<body>
<h1>DOS Update System - Engineer Guide</h1>
<div class="metadata">
<p><strong>Document Version:</strong> 1.0</p>
<p><strong>Date:</strong> January 19, 2026</p>
<p><strong>Audience:</strong> Engineers and System Administrators</p>
<p><strong>Prerequisites:</strong> Network access to \\AD2\test\ share</p>
</div>
<hr class="divider">
<div class="toc">
<h2>Table of Contents</h2>
<ol>
<li><a href="#quick-start">Quick Start</a></li>
<li><a href="#accessing-share">Accessing the Test Share</a></li>
<li><a href="#file-placement">File Placement Guide</a></li>
<li><a href="#sync-process">Sync Process</a></li>
<li><a href="#troubleshooting">Troubleshooting</a></li>
<li><a href="#best-practices">Best Practices</a></li>
</ol>
</div>
<hr class="divider">
<h2 id="quick-start">Quick Start</h2>
<p><strong>To deploy a software update:</strong></p>
<ol>
<li>Map network drive to <code>\\AD2\test</code></li>
<li>Copy files to: <code>\\AD2\test\COMMON\ProdSW\</code></li>
<li>Wait 15 minutes for sync to NAS</li>
<li>DOS machines download on next reboot</li>
</ol>
<hr class="divider">
<h2 id="accessing-share">Accessing the Test Share</h2>
<h3>Map Network Drive</h3>
<p><strong>Windows File Explorer:</strong></p>
<ol>
<li>Open File Explorer</li>
<li>Click "Map network drive"</li>
<li>Drive letter: <code>T:</code></li>
<li>Path: <code>\\AD2\test</code></li>
<li>Credentials: <code>INTRANET\[your-username]</code></li>
</ol>
<p>Once mapped successfully, you'll see T: drive appear in File Explorer with access to the test share folders.</p>
<p><strong>Command Line:</strong></p>
<pre><code>net use T: \\AD2\test /persistent:yes</code></pre>
<p><strong>PowerShell:</strong></p>
<pre><code>New-PSDrive -Name "T" -PSProvider FileSystem -Root "\\AD2\test" -Persist</code></pre>
<h3>Direct UNC Path</h3>
<pre><code>copy C:\MyFiles\*.BAT \\AD2\test\COMMON\ProdSW\</code></pre>
<h3>Folder Structure</h3>
<pre><code>\\AD2\test\
├── COMMON\
│ ├── ProdSW\ ← Batch files, executables, configs
│ ├── DOS\ ← System files (AUTOEXEC.NEW, CONFIG.NEW)
│ └── NET\ ← Network client updates
├── TS-01\ ← Machine-specific folders
├── TS-02\
└── TS-30\</code></pre>
<p>When you open <code>\\AD2\test\</code> in Windows Explorer, you'll see the COMMON folder plus numbered folders (TS-01 through TS-30) for each test machine.</p>
<hr class="divider">
<h2 id="file-placement">File Placement Guide</h2>
<table>
<thead>
<tr>
<th>File Type</th>
<th>Destination</th>
<th>Scope</th>
<th>Deployed To</th>
</tr>
</thead>
<tbody>
<tr>
<td>Batch files (.BAT)</td>
<td><code>\\AD2\test\COMMON\ProdSW\</code></td>
<td>All machines</td>
<td>C:\BAT\</td>
</tr>
<tr>
<td>Executables (.EXE)</td>
<td><code>\\AD2\test\COMMON\ProdSW\</code></td>
<td>All machines</td>
<td>C:\ATE\</td>
</tr>
<tr>
<td>Config files (.CFG)</td>
<td><code>\\AD2\test\COMMON\ProdSW\</code></td>
<td>All machines</td>
<td>C:\ATE\</td>
</tr>
<tr>
<td>System files (.NEW)</td>
<td><code>\\AD2\test\COMMON\DOS\</code></td>
<td>All machines</td>
<td>Staged for reboot</td>
</tr>
<tr>
<td>Machine-specific</td>
<td><code>\\AD2\test\TS-XX\ProdSW\</code></td>
<td>Single machine</td>
<td>C:\BAT\ and C:\ATE\</td>
</tr>
</tbody>
</table>
<h3>Deploy Batch File Update</h3>
<ol>
<li>Access: <code>\\AD2\test\COMMON\ProdSW\</code></li>
<li>Backup existing file (rename to .BAK)</li>
<li>Copy new file to share</li>
<li>Verify file size and timestamp</li>
<li>Wait 15 minutes for sync</li>
<li>DOS machines download on next reboot</li>
</ol>
<p>The file copy should complete instantly. You'll see the new file appear in the ProdSW folder with the current date and time.</p>
<hr class="divider">
<h2 id="sync-process">Sync Process</h2>
<div class="diagram">┌─────────────────────────────────────────────────────────────────┐
│ Step 1: Engineer places file on AD2 │
│ Location: \\AD2\test\COMMON\ProdSW\NEWFILE.BAT │
│ Time: 0 minutes │
└─────────────────────────────────────────────────────────────────┘
│ Automatic Sync (every 15 minutes)
┌─────────────────────────────────────────────────────────────────┐
│ Step 2: File syncs to NAS │
│ Location: /data/test/COMMON/ProdSW/NEWFILE.BAT │
│ DOS Access: T:\COMMON\ProdSW\NEWFILE.BAT │
│ Time: 0-15 minutes │
└─────────────────────────────────────────────────────────────────┘
│ DOS machine reboots
┌─────────────────────────────────────────────────────────────────┐
│ Step 3: NWTOC downloads to DOS machine │
│ Location: C:\BAT\NEWFILE.BAT │
│ Status: Ready to use │
└─────────────────────────────────────────────────────────────────┘</div>
<h3>Timing</h3>
<table>
<thead>
<tr>
<th>Action</th>
<th>Time</th>
</tr>
</thead>
<tbody>
<tr>
<td>Copy to AD2</td>
<td>Instant</td>
</tr>
<tr>
<td>AD2 → NAS sync</td>
<td>0-15 minutes</td>
</tr>
<tr>
<td>NAS → DOS machine</td>
<td>Next reboot</td>
</tr>
</tbody>
</table>
<div class="note-box">
<p><strong>For urgent updates:</strong> Ask test staff to reboot machine or manually run NWTOC.BAT</p>
</div>
<hr class="divider">
<h2 id="troubleshooting">Troubleshooting</h2>
<h3>Cannot Access \\AD2\test\</h3>
<p><strong>Solutions:</strong></p>
<ol>
<li>Verify credentials: <code>INTRANET\username</code></li>
<li>Ping AD2: <code>ping 192.168.0.6</code></li>
<li>Enable SMB1 if required (Windows 10+)</li>
<li>If still unable to access, contact IT</li>
</ol>
<p>If the network path is not accessible, Windows will display an error: "\\AD2\test is not accessible. You might not have permission to use this network resource."</p>
<h3>File Not Updating on DOS Machine</h3>
<p><strong>Check:</strong></p>
<ol>
<li>File exists on AD2: <code>dir \\AD2\test\COMMON\ProdSW\FILENAME.BAT</code></li>
<li>Wait 15+ minutes for sync</li>
<li>Verify on NAS: <code>DIR T:\COMMON\ProdSW\</code> on DOS machine</li>
<li>Check DOS clock (must be correct for XCOPY /D to work)</li>
<li>Force update: Delete file on DOS, run NWTOC</li>
</ol>
<h3>Sync Not Happening</h3>
<p><strong>Check:</strong></p>
<ol>
<li>Scheduled task on AD2 is running</li>
<li>NAS is accessible from AD2</li>
<li>Ping NAS: <code>ping 192.168.0.9</code></li>
<li>Contact IT to manually trigger sync</li>
</ol>
<hr class="divider">
<h2 id="best-practices">Best Practices</h2>
<h3>File Naming</h3>
<p><strong>Use:</strong></p>
<ul>
<li>Uppercase: <code>MYFILE.BAT</code></li>
<li>8.3 format: <code>FILENAME.EXT</code></li>
<li>Underscores: <code>MY_FILE.BAT</code></li>
<li>Dates: <code>FILE_20260119.BAT</code></li>
</ul>
<p><strong>Avoid:</strong></p>
<ul>
<li>Spaces: <code>MY FILE.BAT</code></li>
<li>Special characters: <code>FILE@#$.BAT</code></li>
<li>Long names: <code>VERYLONGFILENAME.BAT</code></li>
</ul>
<h3>Testing</h3>
<p><strong>Always test on TS-30 first:</strong></p>
<ol>
<li>Deploy to <code>\\AD2\test\TS-30\ProdSW\</code></li>
<li>Wait for sync + reboot TS-30</li>
<li>Verify functionality</li>
<li>Deploy to COMMON if successful</li>
</ol>
<h3>Backup</h3>
<p><strong>Before deploying:</strong></p>
<ol>
<li>Rename old file to .BAK</li>
<li>Or copy to <code>_backup\</code> folder</li>
<li>Include date in backup filename</li>
<li>Keep backups for 30 days</li>
</ol>
<h3>Communication</h3>
<p><strong>Notify test staff:</strong></p>
<ul>
<li>Email: What changed, expected behavior</li>
<li>Urgent updates: Phone or Teams</li>
<li>System file updates: Schedule during off-hours</li>
</ul>
<hr class="divider">
<h2>Quick Reference</h2>
<p><strong>Deployment time:</strong> 15 minutes to 24 hours (depending on reboot schedule)</p>
<p><strong>File locations:</strong></p>
<ul>
<li>COMMON: All 30 machines</li>
<li>TS-XX: Specific machine only</li>
<li>Machine-specific overrides COMMON</li>
</ul>
<p><strong>Emergency rollback:</strong></p>
<pre><code>copy \\AD2\test\COMMON\ProdSW\_backup\FILE.BAK \\AD2\test\COMMON\ProdSW\FILE.BAT</code></pre>
</body>
</html>