diff --git a/DOS_DEPLOYMENT_GUIDE.md b/DOS_DEPLOYMENT_GUIDE.md index b8ea0a1..ec03c57 100644 --- a/DOS_DEPLOYMENT_GUIDE.md +++ b/DOS_DEPLOYMENT_GUIDE.md @@ -188,10 +188,12 @@ Next Steps: 1. REBOOT this machine to activate MACHINE variable Press Ctrl+Alt+Del to reboot -2. After reboot, run NWTOC to download all updates: - C:\BAT\NWTOC +2. After reboot, system will automatically: + - Start network (STARTNET.BAT) + - Download updates (NWTOC.BAT runs automatically) + - Load test menu (MENUX.EXE) -3. Create initial backup: +3. Create initial backup when convenient: C:\BAT\UPDATE ============================================================== diff --git a/check-junction.ps1 b/check-junction.ps1 new file mode 100644 index 0000000..3706790 --- /dev/null +++ b/check-junction.ps1 @@ -0,0 +1,50 @@ +$password = ConvertTo-SecureString 'Paper123!@#' -AsPlainText -Force +$cred = New-Object System.Management.Automation.PSCredential('INTRANET\sysadmin', $password) + +Write-Host "================================================" -ForegroundColor Cyan +Write-Host "Checking COMMON vs _COMMON on AD2" -ForegroundColor Cyan +Write-Host "================================================" -ForegroundColor Cyan +Write-Host "" + +Invoke-Command -ComputerName 192.168.0.6 -Credential $cred -ScriptBlock { + Write-Host "=== Checking if _COMMON and COMMON are junctioned ===" -ForegroundColor Yellow + Write-Host "" + + # Check _COMMON + $underCommon = Get-Item "C:\Shares\test\_COMMON" -Force + Write-Host "_COMMON:" -ForegroundColor Cyan + Write-Host " Type: $($underCommon.Attributes)" -ForegroundColor White + if ($underCommon.LinkType) { + Write-Host " LinkType: $($underCommon.LinkType)" -ForegroundColor Green + Write-Host " Target: $($underCommon.Target)" -ForegroundColor Green + } else { + Write-Host " LinkType: Not a link/junction" -ForegroundColor Yellow + } + Write-Host "" + + # Check COMMON + $common = Get-Item "C:\Shares\test\COMMON" -Force + Write-Host "COMMON:" -ForegroundColor Cyan + Write-Host " Type: $($common.Attributes)" -ForegroundColor White + if ($common.LinkType) { + Write-Host " LinkType: $($common.LinkType)" -ForegroundColor Green + Write-Host " Target: $($common.Target)" -ForegroundColor Green + } else { + Write-Host " LinkType: Not a link/junction" -ForegroundColor Yellow + } + Write-Host "" + + # Compare file counts + Write-Host "=== File Counts ===" -ForegroundColor Yellow + $underCount = (Get-ChildItem "C:\Shares\test\_COMMON\ProdSW" -File -ErrorAction SilentlyContinue | Measure-Object).Count + $commonCount = (Get-ChildItem "C:\Shares\test\COMMON\ProdSW" -File -ErrorAction SilentlyContinue | Measure-Object).Count + + Write-Host "_COMMON\ProdSW: $underCount files" -ForegroundColor White + Write-Host "COMMON\ProdSW: $commonCount files" -ForegroundColor White + + if ($underCount -ne $commonCount) { + Write-Host "WARNING: File counts differ!" -ForegroundColor Red + } else { + Write-Host "File counts match" -ForegroundColor Green + } +} diff --git a/check-sync-status.ps1 b/check-sync-status.ps1 index 4629e3f..1288ddc 100644 --- a/check-sync-status.ps1 +++ b/check-sync-status.ps1 @@ -1,38 +1,19 @@ -# Check if sync is running and show recent log output -$password = ConvertTo-SecureString "Paper123!@#" -AsPlainText -Force -$cred = New-Object System.Management.Automation.PSCredential("INTRANET\sysadmin", $password) +$password = ConvertTo-SecureString 'Paper123!@#' -AsPlainText -Force +$cred = New-Object System.Management.Automation.PSCredential('INTRANET\sysadmin', $password) Invoke-Command -ComputerName 192.168.0.6 -Credential $cred -ScriptBlock { - Write-Host "=== Sync Status Check ===" -ForegroundColor Cyan - Write-Host "" - - # Check for running PowerShell processes with Sync-FromNAS - $syncProcesses = Get-Process powershell -ErrorAction SilentlyContinue | Where-Object { - $_.CommandLine -like "*Sync-FromNAS*" - } - - if ($syncProcesses) { - Write-Host "[RUNNING] Sync process(es) active:" -ForegroundColor Yellow - $syncProcesses | ForEach-Object { - Write-Host " PID $($_.Id) - Started: $($_.StartTime)" -ForegroundColor Gray - } + Write-Host "=== Sync Status File ===" -ForegroundColor Cyan + if (Test-Path "C:\Shares\test\_SYNC_STATUS.txt") { + Get-Content "C:\Shares\test\_SYNC_STATUS.txt" } else { - Write-Host "[IDLE] No sync processes running" -ForegroundColor Green + Write-Host "Status file not found" -ForegroundColor Red } - + Write-Host "" - Write-Host "Recent log output (last 30 lines):" -ForegroundColor Cyan - Write-Host "=" * 80 -ForegroundColor Gray - - Get-Content "C:\Shares\test\scripts\sync-from-nas.log" -Tail 30 | ForEach-Object { - if ($_ -match "ERROR|error") { - Write-Host $_ -ForegroundColor Red - } elseif ($_ -match "Pushed|Pulled") { - Write-Host $_ -ForegroundColor Green - } elseif ($_ -match "Starting|Complete") { - Write-Host $_ -ForegroundColor Cyan - } else { - Write-Host $_ -ForegroundColor Gray - } + Write-Host "=== Last 30 lines of Sync Log ===" -ForegroundColor Cyan + if (Test-Path "C:\Shares\test\scripts\sync-from-nas.log") { + Get-Content "C:\Shares\test\scripts\sync-from-nas.log" | Select-Object -Last 30 + } else { + Write-Host "Log file not found" -ForegroundColor Red } } diff --git a/compare-common-folders.ps1 b/compare-common-folders.ps1 new file mode 100644 index 0000000..9cdc104 --- /dev/null +++ b/compare-common-folders.ps1 @@ -0,0 +1,37 @@ +$password = ConvertTo-SecureString 'Paper123!@#' -AsPlainText -Force +$cred = New-Object System.Management.Automation.PSCredential('INTRANET\sysadmin', $password) + +Invoke-Command -ComputerName 192.168.0.6 -Credential $cred -ScriptBlock { + Write-Host "=== Files in _COMMON\ProdSW ===" -ForegroundColor Yellow + Get-ChildItem "C:\Shares\test\_COMMON\ProdSW" -File | + Select-Object Name, Length, LastWriteTime | + Sort-Object Name | + Format-Table -AutoSize + + Write-Host "" + Write-Host "=== Files in COMMON\ProdSW ===" -ForegroundColor Yellow + Get-ChildItem "C:\Shares\test\COMMON\ProdSW" -File | + Select-Object Name, Length, LastWriteTime | + Sort-Object Name | + Format-Table -AutoSize + + Write-Host "" + Write-Host "=== Files ONLY in _COMMON\ProdSW ===" -ForegroundColor Cyan + $underFiles = Get-ChildItem "C:\Shares\test\_COMMON\ProdSW" -File | Select-Object -ExpandProperty Name + $commonFiles = Get-ChildItem "C:\Shares\test\COMMON\ProdSW" -File | Select-Object -ExpandProperty Name + $onlyInUnder = $underFiles | Where-Object { $_ -notin $commonFiles } + if ($onlyInUnder) { + $onlyInUnder | ForEach-Object { Write-Host " $_" -ForegroundColor White } + } else { + Write-Host " (none)" -ForegroundColor Gray + } + + Write-Host "" + Write-Host "=== Files ONLY in COMMON\ProdSW ===" -ForegroundColor Cyan + $onlyInCommon = $commonFiles | Where-Object { $_ -notin $underFiles } + if ($onlyInCommon) { + $onlyInCommon | ForEach-Object { Write-Host " $_" -ForegroundColor White } + } else { + Write-Host " (none)" -ForegroundColor Gray + } +} diff --git a/credentials.md b/credentials.md index 3fcffd2..57a0c64 100644 --- a/credentials.md +++ b/credentials.md @@ -140,6 +140,8 @@ - DOS 6.22 limitations: no %COMPUTERNAME%, no IF /I - Network stack: MS Client 3.0, Netware VLM client - Update workflow: AD2 → D2TESTNAS → DOS machines + - Startup sequence: AUTOEXEC.BAT → STARTNET.BAT → MENUX.EXE + - MENUX menu provides test module selection interface ### AD2-NAS Sync System - **Script:** C:\Shares\test\scripts\Sync-FromNAS.ps1 diff --git a/deploy-correct-bat-files.ps1 b/deploy-correct-bat-files.ps1 new file mode 100644 index 0000000..5c0219b --- /dev/null +++ b/deploy-correct-bat-files.ps1 @@ -0,0 +1,58 @@ +$password = ConvertTo-SecureString 'Paper123!@#' -AsPlainText -Force +$cred = New-Object System.Management.Automation.PSCredential('INTRANET\sysadmin', $password) + +Write-Host "================================================" -ForegroundColor Cyan +Write-Host "Deploying Correct BAT Files to AD2" -ForegroundColor Cyan +Write-Host "================================================" -ForegroundColor Cyan +Write-Host "" + +# Map network drive +Write-Host "[1/4] Mapping network drive to AD2..." -ForegroundColor Yellow +$null = New-PSDrive -Name TEMP_AD2 -PSProvider FileSystem -Root "\\192.168.0.6\C$" -Credential $cred -ErrorAction Stop +Write-Host "[OK] Network drive mapped" -ForegroundColor Green +Write-Host "" + +# Copy to _COMMON\ProdSW (update old versions) +Write-Host "[2/4] Updating _COMMON\ProdSW with correct versions..." -ForegroundColor Yellow +Copy-Item D:\ClaudeTools\DEPLOY.BAT "TEMP_AD2:\Shares\test\_COMMON\ProdSW\" -Force +Copy-Item D:\ClaudeTools\CTONW.BAT "TEMP_AD2:\Shares\test\_COMMON\ProdSW\" -Force +Copy-Item D:\ClaudeTools\CTONWTXT.BAT "TEMP_AD2:\Shares\test\_COMMON\ProdSW\" -Force +Copy-Item D:\ClaudeTools\NWTOC.BAT "TEMP_AD2:\Shares\test\_COMMON\ProdSW\" -Force +Copy-Item D:\ClaudeTools\UPDATE.BAT "TEMP_AD2:\Shares\test\_COMMON\ProdSW\" -Force +Copy-Item D:\ClaudeTools\CHECKUPD.BAT "TEMP_AD2:\Shares\test\_COMMON\ProdSW\" -Force +Copy-Item D:\ClaudeTools\STAGE.BAT "TEMP_AD2:\Shares\test\_COMMON\ProdSW\" -Force +Copy-Item D:\ClaudeTools\REBOOT.BAT "TEMP_AD2:\Shares\test\_COMMON\ProdSW\" -Force +Write-Host "[OK] _COMMON\ProdSW updated" -ForegroundColor Green +Write-Host "" + +# Copy to COMMON\ProdSW (ensure latest) +Write-Host "[3/4] Ensuring COMMON\ProdSW has latest versions..." -ForegroundColor Yellow +Copy-Item D:\ClaudeTools\DEPLOY.BAT "TEMP_AD2:\Shares\test\COMMON\ProdSW\" -Force +Copy-Item D:\ClaudeTools\CTONW.BAT "TEMP_AD2:\Shares\test\COMMON\ProdSW\" -Force +Copy-Item D:\ClaudeTools\CTONWTXT.BAT "TEMP_AD2:\Shares\test\COMMON\ProdSW\" -Force +Copy-Item D:\ClaudeTools\NWTOC.BAT "TEMP_AD2:\Shares\test\COMMON\ProdSW\" -Force +Copy-Item D:\ClaudeTools\UPDATE.BAT "TEMP_AD2:\Shares\test\COMMON\ProdSW\" -Force +Copy-Item D:\ClaudeTools\CHECKUPD.BAT "TEMP_AD2:\Shares\test\COMMON\ProdSW\" -Force +Copy-Item D:\ClaudeTools\STAGE.BAT "TEMP_AD2:\Shares\test\COMMON\ProdSW\" -Force +Copy-Item D:\ClaudeTools\REBOOT.BAT "TEMP_AD2:\Shares\test\COMMON\ProdSW\" -Force +Write-Host "[OK] COMMON\ProdSW updated" -ForegroundColor Green +Write-Host "" + +# Copy DEPLOY.BAT to root +Write-Host "[4/4] Copying DEPLOY.BAT to root (C:\Shares\test\)..." -ForegroundColor Yellow +Copy-Item D:\ClaudeTools\DEPLOY.BAT "TEMP_AD2:\Shares\test\" -Force +Write-Host "[OK] DEPLOY.BAT copied to root" -ForegroundColor Green +Write-Host "" + +# Cleanup +Remove-PSDrive -Name TEMP_AD2 + +Write-Host "================================================" -ForegroundColor Green +Write-Host "Deployment Complete!" -ForegroundColor Green +Write-Host "================================================" -ForegroundColor Green +Write-Host "" +Write-Host "Files deployed to:" -ForegroundColor Cyan +Write-Host " - C:\Shares\test\COMMON\ProdSW\" -ForegroundColor White +Write-Host " - C:\Shares\test\_COMMON\ProdSW\" -ForegroundColor White +Write-Host " - C:\Shares\test\DEPLOY.BAT (root)" -ForegroundColor White +Write-Host "" diff --git a/docs/DEPLOYMENT_GUIDE.html b/docs/DEPLOYMENT_GUIDE.html new file mode 100644 index 0000000..0a9a485 --- /dev/null +++ b/docs/DEPLOYMENT_GUIDE.html @@ -0,0 +1,523 @@ + + + + + + DOS Update System - Test Staff Guide + + + + + + +

DOS Update System - Test Staff 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)

+
+ +
+ +
+

Table of Contents

+
    +
  1. Daily Operations
  2. +
  3. First Time Setup
  4. +
  5. Manual Operations
  6. +
  7. Troubleshooting
  8. +
  9. Quick Reference
  10. +
+
+ +
+ +

Daily Operations

+ +

Starting your test machine:

+
    +
  1. Power on DOS machine
  2. +
  3. Wait for boot process
  4. +
  5. System automatically downloads updates
  6. +
  7. System automatically uploads test data
  8. +
  9. See "System Ready" message
  10. +
  11. Start testing
  12. +
+ +
+

No manual commands needed - the system handles everything automatically.

+
+ +

Boot Sequence

+ +
┌─────────────────────────────────────────────────────────────────┐ +│ 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 │ +│ │ +│ 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:\> │ +└─────────────────────────────────────────────────────────────────┘
+ +

Boot time: 2-3 minutes

+ +
+ +

First Time Setup

+ +

For new or reformatted machines:

+ +

1 Boot Machine

+ + +

You should see a black DOS screen with white text showing the machine name and a blinking cursor at the C:\> prompt.

+ +

2 Verify Network

+

Type:

+
DIR T:\
+ +

Should see COMMON and TS-XX folders.

+ +

3 Run Deployment

+

Type (replace XX with your machine number):

+
T:\UPDATE.BAT TS-04
+ +

The deployment script will start immediately and display the installation progress.

+ +

4 Watch Progress

+ +
============================================================== +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 . . .
+ +

5 Deployment Complete

+ +
============================================================== +Deployment Complete! +============================================================== + +Machine: TS-04 + +The automatic update system is now installed. + +============================================================== +REBOOT NOW +============================================================== + +Press Ctrl+Alt+Del to reboot
+ +

6 Reboot

+

Press Ctrl+Alt+Del to reboot.

+ +
+ +

Manual Operations

+ +

Manual operations are optional. Use them when needed:

+ +

Check for Updates

+
C:\BAT\CHECKUPD
+ +

This displays a list of files on the network that are newer than your local files.

+ +

Download Updates Now

+
C:\BAT\NWTOC
+ +

This runs the same update process that happens automatically at boot. You'll see progress messages as files are downloaded.

+ +

Upload Test Data Now

+
C:\BAT\CTONW
+ +

This uploads your local test data and programs to the network. Progress messages show which files are being uploaded.

+ +
+ +

Troubleshooting

+ +

Network Not Available

+

Error: "T: drive not available"

+ +

Solution:

+
    +
  1. Check network cable
  2. +
  3. Restart network: C:\NET\STARTNET
  4. +
  5. Wait 30 seconds
  6. +
  7. Try: DIR T:\
  8. +
+ +

If the network is working, DIR T:\ will show a directory listing. If not working, you'll see "Invalid drive specification".

+ +

Updates Not Downloading

+

Solution:

+
    +
  1. Wait 15-20 minutes (for sync)
  2. +
  3. Reboot machine
  4. +
  5. Check DOS date/time: DATE and TIME
  6. +
  7. Contact engineering if still not working
  8. +
+ +

Boot Takes Too Long

+

Normal boot time: 2-3 minutes

+ +

If longer:

+
    +
  1. Check network cable
  2. +
  3. Press Ctrl+C to skip if stuck
  4. +
  5. Contact IT
  6. +
+ +
+ +

Quick Reference

+ +

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
+ +

Troubleshooting

+
C:\NET\STARTNET  - Restart network
+DATE             - Check DOS date
+TIME             - Check DOS time
+DIR T:\          - Verify network access
+ +

Emergency Contacts

+
Test Lead: [Contact]
+Engineering: [Contact]
+IT Support: [Contact]
+ + + diff --git a/docs/DEPLOYMENT_GUIDE.md b/docs/DEPLOYMENT_GUIDE.md index 3f60a1a..fbda77a 100644 --- a/docs/DEPLOYMENT_GUIDE.md +++ b/docs/DEPLOYMENT_GUIDE.md @@ -315,9 +315,11 @@ Press any key to continue . . . **Press Ctrl+Alt+Del to reboot** After reboot: -- Automatic updates enabled -- No manual commands needed -- Ready for testing! +- 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! --- diff --git a/docs/ENGINEER_CHANGELOG.html b/docs/ENGINEER_CHANGELOG.html new file mode 100644 index 0000000..04ecd8f --- /dev/null +++ b/docs/ENGINEER_CHANGELOG.html @@ -0,0 +1,440 @@ + + + + + + DOS Update System - Technical Documentation + + + + + + +

DOS Update System - Technical Documentation

+ +
+

Document Version: 1.0

+

Date: January 19, 2026

+

Audience: Engineers and System Administrators

+
+ +
+ +

System Overview

+

The DOS Update System automatically downloads software updates and uploads test data on every machine boot. No manual intervention required.

+ +

Key Features:

+ + +
+ +

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:

+
    +
  1. Sets machine identity (SET MACHINE=TS-XX)
  2. +
  3. Starts network client
  4. +
  5. Calls NWTOC.BAT (downloads updates)
  6. +
  7. Calls CTONW.BAT (uploads test data)
  8. +
+ +
+ +

NWTOC.BAT (Network to Computer)

+

Location: C:\BAT\NWTOC.BAT
+ Function: Downloads software updates from network

+ +

Download paths:

+ + +

Features:

+ + +
+ +

CTONW.BAT (Computer to Network)

+

Location: C:\BAT\CTONW.BAT
+ Function: Uploads test data and programs to network

+ +

Upload paths:

+ + +

Data routing:

+ + +
+ +

DEPLOY.BAT

+

Location: T:\COMMON\ProdSW\DEPLOY.BAT
+ Function: Initial machine deployment
+ Usage: T:\UPDATE.BAT TS-XX (one-time setup)

+ +

Deployment steps:

+
    +
  1. Creates C:\BAT\ directory
  2. +
  3. Copies all batch files to C:\BAT\
  4. +
  5. Installs AUTOEXEC.BAT with machine name
  6. +
  7. Creates network backup folder T:\TS-XX\
  8. +
+ +
+ +

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

+ +
    +
  1. DOS machine boots
  2. +
  3. Network starts (C:\NET\STARTNET.BAT)
  4. +
  5. NWTOC runs automatically (downloads updates)
  6. +
  7. CTONW runs automatically (uploads test data)
  8. +
  9. System ready for testing
  10. +
+ +

User actions required: None

+ +
+ +

Deployment Status

+ +

Files on AD2:

+ + +

Sync to NAS:

+ + +
+ +

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:

+ + +

Utility Files:

+ + +
+ +

Support

+ +

Documentation:

+ + +

Emergency Contact:

+ + + + diff --git a/docs/ENGINEER_HOWTO_GUIDE.html b/docs/ENGINEER_HOWTO_GUIDE.html new file mode 100644 index 0000000..9eb088e --- /dev/null +++ b/docs/ENGINEER_HOWTO_GUIDE.html @@ -0,0 +1,563 @@ + + + + + + DOS Update System - Engineer Guide + + + + + + +

DOS Update System - Engineer 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. +
  3. Accessing the Test Share
  4. +
  5. File Placement Guide
  6. +
  7. Sync Process
  8. +
  9. Troubleshooting
  10. +
  11. Best Practices
  12. +
+
+ +
+ +

Quick Start

+ +

To deploy a software update:

+
    +
  1. Map network drive to \\AD2\test
  2. +
  3. Copy files to: \\AD2\test\COMMON\ProdSW\
  4. +
  5. Wait 15 minutes for sync to NAS
  6. +
  7. DOS machines download on next reboot
  8. +
+ +
+ +

Accessing the Test Share

+ +

Map Network Drive

+ +

Windows File Explorer:

+
    +
  1. Open File Explorer
  2. +
  3. Click "Map network drive"
  4. +
  5. Drive letter: T:
  6. +
  7. Path: \\AD2\test
  8. +
  9. Credentials: INTRANET\[your-username]
  10. +
+ +

Once mapped successfully, you'll see T: drive appear in File Explorer with access to the test share folders.

+ +

Command Line:

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

PowerShell:

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

Direct UNC Path

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

Folder Structure

+
\\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\
+ +

When you open \\AD2\test\ in Windows Explorer, you'll see the COMMON folder plus numbered folders (TS-01 through TS-30) for each test machine.

+ +
+ +

File Placement Guide

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
File TypeDestinationScopeDeployed To
Batch files (.BAT)\\AD2\test\COMMON\ProdSW\All machinesC:\BAT\
Executables (.EXE)\\AD2\test\COMMON\ProdSW\All machinesC:\ATE\
Config files (.CFG)\\AD2\test\COMMON\ProdSW\All machinesC:\ATE\
System files (.NEW)\\AD2\test\COMMON\DOS\All machinesStaged for reboot
Machine-specific\\AD2\test\TS-XX\ProdSW\Single machineC:\BAT\ and C:\ATE\
+ +

Deploy Batch File Update

+ +
    +
  1. Access: \\AD2\test\COMMON\ProdSW\
  2. +
  3. Backup existing file (rename to .BAK)
  4. +
  5. Copy new file to share
  6. +
  7. Verify file size and timestamp
  8. +
  9. Wait 15 minutes for sync
  10. +
  11. DOS machines download on next reboot
  12. +
+ +

The file copy should complete instantly. You'll see the new file appear in the ProdSW folder with the current date and time.

+ +
+ +

Sync Process

+ +
┌─────────────────────────────────────────────────────────────────┐ +│ 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 │ +└─────────────────────────────────────────────────────────────────┘
+ +

Timing

+ + + + + + + + + + + + + + + + + + + + + +
ActionTime
Copy to AD2Instant
AD2 → NAS sync0-15 minutes
NAS → DOS machineNext reboot
+ +
+

For urgent updates: Ask test staff to reboot machine or manually run NWTOC.BAT

+
+ +
+ +

Troubleshooting

+ +

Cannot Access \\AD2\test\

+ +

Solutions:

+
    +
  1. Verify credentials: INTRANET\username
  2. +
  3. Ping AD2: ping 192.168.0.6
  4. +
  5. Enable SMB1 if required (Windows 10+)
  6. +
  7. If still unable to access, contact IT
  8. +
+ +

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."

+ +

File Not Updating on DOS Machine

+ +

Check:

+
    +
  1. File exists on AD2: dir \\AD2\test\COMMON\ProdSW\FILENAME.BAT
  2. +
  3. Wait 15+ minutes for sync
  4. +
  5. Verify on NAS: DIR T:\COMMON\ProdSW\ on DOS machine
  6. +
  7. Check DOS clock (must be correct for XCOPY /D to work)
  8. +
  9. Force update: Delete file on DOS, run NWTOC
  10. +
+ +

Sync Not Happening

+ +

Check:

+
    +
  1. Scheduled task on AD2 is running
  2. +
  3. NAS is accessible from AD2
  4. +
  5. Ping NAS: ping 192.168.0.9
  6. +
  7. Contact IT to manually trigger sync
  8. +
+ +
+ +

Best Practices

+ +

File Naming

+ +

Use:

+ + +

Avoid:

+ + +

Testing

+ +

Always test on TS-30 first:

+
    +
  1. Deploy to \\AD2\test\TS-30\ProdSW\
  2. +
  3. Wait for sync + reboot TS-30
  4. +
  5. Verify functionality
  6. +
  7. Deploy to COMMON if successful
  8. +
+ +

Backup

+ +

Before deploying:

+
    +
  1. Rename old file to .BAK
  2. +
  3. Or copy to _backup\ folder
  4. +
  5. Include date in backup filename
  6. +
  7. Keep backups for 30 days
  8. +
+ +

Communication

+ +

Notify test staff:

+ + +
+ +

Quick Reference

+ +

Deployment time: 15 minutes to 24 hours (depending on reboot schedule)

+ +

File locations:

+ + +

Emergency rollback:

+
copy \\AD2\test\COMMON\ProdSW\_backup\FILE.BAK \\AD2\test\COMMON\ProdSW\FILE.BAT
+ + + diff --git a/docs/ENGINEER_HOWTO_GUIDE.md b/docs/ENGINEER_HOWTO_GUIDE.md index 824d256..3f8c753 100644 --- a/docs/ENGINEER_HOWTO_GUIDE.md +++ b/docs/ENGINEER_HOWTO_GUIDE.md @@ -282,11 +282,12 @@ Copy-Item C:\MyFiles\*.BAT -Destination \\AD2\test\COMMON\ProdSW\ 2. File syncs to NAS (15 minutes) 3. DOS machine reboots 4. AUTOEXEC.BAT runs automatically: - - Network starts + - 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 -5. System ready for testing + - 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.** diff --git a/fix-common-junction.ps1 b/fix-common-junction.ps1 new file mode 100644 index 0000000..fbed05e --- /dev/null +++ b/fix-common-junction.ps1 @@ -0,0 +1,60 @@ +$password = ConvertTo-SecureString 'Paper123!@#' -AsPlainText -Force +$cred = New-Object System.Management.Automation.PSCredential('INTRANET\sysadmin', $password) + +Write-Host "================================================" -ForegroundColor Cyan +Write-Host "Creating Junction: COMMON -> _COMMON" -ForegroundColor Cyan +Write-Host "================================================" -ForegroundColor Cyan +Write-Host "" + +Invoke-Command -ComputerName 192.168.0.6 -Credential $cred -ScriptBlock { + Write-Host "[1/4] Backing up COMMON to COMMON.backup..." -ForegroundColor Yellow + if (Test-Path "C:\Shares\test\COMMON.backup") { + Remove-Item "C:\Shares\test\COMMON.backup" -Recurse -Force + } + Copy-Item "C:\Shares\test\COMMON" "C:\Shares\test\COMMON.backup" -Recurse -Force + Write-Host "[OK] Backup created" -ForegroundColor Green + Write-Host "" + + Write-Host "[2/4] Copying AUTOEXEC.BAT from COMMON to _COMMON..." -ForegroundColor Yellow + Copy-Item "C:\Shares\test\COMMON\ProdSW\AUTOEXEC.BAT" "C:\Shares\test\_COMMON\ProdSW\" -Force + Write-Host "[OK] AUTOEXEC.BAT copied to _COMMON" -ForegroundColor Green + Write-Host "" + + Write-Host "[3/4] Removing COMMON directory..." -ForegroundColor Yellow + Remove-Item "C:\Shares\test\COMMON" -Recurse -Force + Write-Host "[OK] COMMON removed" -ForegroundColor Green + Write-Host "" + + Write-Host "[4/4] Creating junction COMMON -> _COMMON..." -ForegroundColor Yellow + cmd /c mklink /J "C:\Shares\test\COMMON" "C:\Shares\test\_COMMON" + Write-Host "[OK] Junction created" -ForegroundColor Green + Write-Host "" + + Write-Host "=== Verification ===" -ForegroundColor Yellow + $junction = Get-Item "C:\Shares\test\COMMON" -Force + Write-Host "COMMON LinkType: $($junction.LinkType)" -ForegroundColor Cyan + Write-Host "COMMON Target: $($junction.Target)" -ForegroundColor Cyan + Write-Host "" + + Write-Host "=== File count check ===" -ForegroundColor Yellow + $underCount = (Get-ChildItem "C:\Shares\test\_COMMON\ProdSW" -File | Measure-Object).Count + $commonCount = (Get-ChildItem "C:\Shares\test\COMMON\ProdSW" -File | Measure-Object).Count + Write-Host "_COMMON\ProdSW: $underCount files" -ForegroundColor White + Write-Host "COMMON\ProdSW: $commonCount files (via junction)" -ForegroundColor White + + if ($underCount -eq $commonCount) { + Write-Host "[OK] File counts match!" -ForegroundColor Green + } else { + Write-Host "[ERROR] File counts differ!" -ForegroundColor Red + } +} + +Write-Host "" +Write-Host "================================================" -ForegroundColor Green +Write-Host "Junction Created Successfully!" -ForegroundColor Green +Write-Host "================================================" -ForegroundColor Green +Write-Host "" +Write-Host "Result:" -ForegroundColor Cyan +Write-Host " COMMON is now a junction pointing to _COMMON" -ForegroundColor White +Write-Host " Both paths access the same files" -ForegroundColor White +Write-Host " Backup saved to: C:\Shares\test\COMMON.backup" -ForegroundColor White diff --git a/manual-push-to-nas.sh b/manual-push-to-nas.sh new file mode 100644 index 0000000..21cae01 --- /dev/null +++ b/manual-push-to-nas.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +echo "================================================" +echo "Manually Pushing BAT Files to NAS" +echo "================================================" +echo "" + +echo "[1/3] Pushing files to /data/test/COMMON/ProdSW/..." +scp -o StrictHostKeyChecking=no \ + D:/ClaudeTools/DEPLOY.BAT \ + D:/ClaudeTools/CTONW.BAT \ + D:/ClaudeTools/CTONWTXT.BAT \ + D:/ClaudeTools/NWTOC.BAT \ + D:/ClaudeTools/UPDATE.BAT \ + D:/ClaudeTools/CHECKUPD.BAT \ + D:/ClaudeTools/STAGE.BAT \ + D:/ClaudeTools/REBOOT.BAT \ + D:/ClaudeTools/AUTOEXEC.BAT \ + root@192.168.0.9:/data/test/COMMON/ProdSW/ +echo "[OK] COMMON/ProdSW updated" +echo "" + +echo "[2/3] Pushing UPDATE.BAT to /data/test/ root..." +scp -o StrictHostKeyChecking=no D:/ClaudeTools/UPDATE.BAT root@192.168.0.9:/data/test/ +echo "[OK] UPDATE.BAT pushed to root" +echo "" + +echo "[3/3] Pushing DEPLOY.BAT to /data/test/ root..." +scp -o StrictHostKeyChecking=no D:/ClaudeTools/DEPLOY.BAT root@192.168.0.9:/data/test/ +echo "[OK] DEPLOY.BAT pushed to root" +echo "" + +echo "================================================" +echo "Manual Push Complete!" +echo "================================================" diff --git a/read-sync-script.ps1 b/read-sync-script.ps1 new file mode 100644 index 0000000..d7e39a1 --- /dev/null +++ b/read-sync-script.ps1 @@ -0,0 +1,6 @@ +$password = ConvertTo-SecureString 'Paper123!@#' -AsPlainText -Force +$cred = New-Object System.Management.Automation.PSCredential('INTRANET\sysadmin', $password) + +Invoke-Command -ComputerName 192.168.0.6 -Credential $cred -ScriptBlock { + Get-Content "C:\Shares\test\scripts\Sync-FromNAS.ps1" +} diff --git a/search-menux-ad2.ps1 b/search-menux-ad2.ps1 new file mode 100644 index 0000000..92c0140 --- /dev/null +++ b/search-menux-ad2.ps1 @@ -0,0 +1,6 @@ +$password = ConvertTo-SecureString 'Paper123!@#' -AsPlainText -Force +$cred = New-Object System.Management.Automation.PSCredential('INTRANET\sysadmin', $password) + +Invoke-Command -ComputerName 192.168.0.6 -Credential $cred -ScriptBlock { + Get-ChildItem C:\Shares\test -Recurse -Filter '*menux*.bas' -ErrorAction SilentlyContinue | Select-Object FullName, LastWriteTime, Length +} diff --git a/session-logs/2026-01-19-session.md b/session-logs/2026-01-19-session.md index 5be3192..d815f34 100644 --- a/session-logs/2026-01-19-session.md +++ b/session-logs/2026-01-19-session.md @@ -497,6 +497,7 @@ fatal: Could not read from remote repository. - Root Files: `T:\UPDATE.BAT`, `T:\DEPLOY.BAT` - Batch Files: `C:\BAT\` - Programs/Data: `C:\ATE\` (with subdirectories) +- Startup: AUTOEXEC.BAT → STARTNET.BAT → MENUX.EXE (test menu interface) **SSH Keys:** - Location: `C:\Users\MikeSwanson\.ssh\` diff --git a/trigger-sync.ps1 b/trigger-sync.ps1 index 1133f04..0893987 100644 --- a/trigger-sync.ps1 +++ b/trigger-sync.ps1 @@ -1,40 +1,30 @@ -# Trigger sync on AD2 by creating and executing a remote batch file +$password = ConvertTo-SecureString 'Paper123!@#' -AsPlainText -Force +$cred = New-Object System.Management.Automation.PSCredential('INTRANET\sysadmin', $password) -$Username = "INTRANET\sysadmin" -$Password = ConvertTo-SecureString "Paper123!@#" -AsPlainText -Force -$Cred = New-Object System.Management.Automation.PSCredential($Username, $Password) - -Write-Host "Connecting to AD2..." -New-PSDrive -Name TEMP_AD2 -PSProvider FileSystem -Root "\\192.168.0.6\C$" -Credential $Cred | Out-Null -Write-Host "[OK] Connected" +Write-Host "================================================" -ForegroundColor Cyan +Write-Host "Triggering Sync Script on AD2" -ForegroundColor Cyan +Write-Host "================================================" -ForegroundColor Cyan Write-Host "" -# Create a trigger batch file on AD2 -$triggerContent = @" -@ECHO OFF -ECHO Running sync manually... -powershell.exe -ExecutionPolicy Bypass -File C:\Shares\test\scripts\Sync-FromNAS.ps1 -Verbose -ECHO Sync complete. -"@ +Invoke-Command -ComputerName 192.168.0.6 -Credential $cred -ScriptBlock { + Write-Host "Running Sync-FromNAS.ps1..." -ForegroundColor Yellow + Write-Host "" -Set-Content -Path "TEMP_AD2:\Shares\test\scripts\run-sync-now.bat" -Value $triggerContent -Force -Write-Host "[OK] Created trigger script on AD2" + # Run the sync script + & "C:\Shares\test\scripts\Sync-FromNAS.ps1" -# Try to execute it via PsExec-style approach -Write-Host "" -Write-Host "Attempting to trigger sync..." -Write-Host "" + Write-Host "" + Write-Host "Sync complete!" -ForegroundColor Green + Write-Host "" -# Create a scheduled task to run immediately -$taskCmd = @" -schtasks /create /s 192.168.0.6 /u INTRANET\sysadmin /p "Paper123!@#" /tn "TempSyncTrigger" /tr "C:\Shares\test\scripts\run-sync-now.bat" /sc once /st 00:00 /f -schtasks /run /s 192.168.0.6 /u INTRANET\sysadmin /p "Paper123!@#" /tn "TempSyncTrigger" -"@ - -Write-Host $taskCmd -Invoke-Expression $taskCmd + # Show sync status + if (Test-Path "C:\Shares\test\_SYNC_STATUS.txt") { + Write-Host "=== Sync Status ===" -ForegroundColor Yellow + Get-Content "C:\Shares\test\_SYNC_STATUS.txt" | Select-Object -Last 10 + } +} Write-Host "" -Write-Host "[INFO] Sync triggered. Check C:\Shares\test\scripts\sync-from-nas.log for results." - -Remove-PSDrive TEMP_AD2 +Write-Host "================================================" -ForegroundColor Green +Write-Host "Sync Triggered Successfully" -ForegroundColor Green +Write-Host "================================================" -ForegroundColor Green diff --git a/verify-bat-deployment.ps1 b/verify-bat-deployment.ps1 new file mode 100644 index 0000000..1273df5 --- /dev/null +++ b/verify-bat-deployment.ps1 @@ -0,0 +1,24 @@ +$password = ConvertTo-SecureString 'Paper123!@#' -AsPlainText -Force +$cred = New-Object System.Management.Automation.PSCredential('INTRANET\sysadmin', $password) + +Write-Host "================================================" -ForegroundColor Cyan +Write-Host "Checking BAT files on AD2" -ForegroundColor Cyan +Write-Host "================================================" -ForegroundColor Cyan +Write-Host "" + +Invoke-Command -ComputerName 192.168.0.6 -Credential $cred -ScriptBlock { + Write-Host "=== Root Files ===" -ForegroundColor Yellow + Get-ChildItem C:\Shares\test\*.BAT -ErrorAction SilentlyContinue | + Select-Object Name, Length, LastWriteTime | + Format-Table -AutoSize + + Write-Host "=== COMMON\ProdSW ===" -ForegroundColor Yellow + Get-ChildItem C:\Shares\test\COMMON\ProdSW\*.BAT -ErrorAction SilentlyContinue | + Select-Object Name, Length, LastWriteTime | + Format-Table -AutoSize + + Write-Host "=== _COMMON\ProdSW ===" -ForegroundColor Yellow + Get-ChildItem "C:\Shares\test\_COMMON\ProdSW\*.BAT" -ErrorAction SilentlyContinue | + Select-Object Name, Length, LastWriteTime | + Format-Table -AutoSize +}