PC-CRASH-DIAG  -  CoolTech Computers
For a PC that freezes, restarts or switches itself off. Built for a Dell Inspiron 24 5415 all-in-one but works on any Windows 10/11 PC.

TWO WAYS TO USE IT

A. THE PC STARTS WINDOWS  ->  1-RUN-DIAG.cmd
   Double-click, click Yes. Menu:
     1  QUICK CHECK  (3 min)   disk health, crash history, how long each start-up ran, temperatures, what it points to
     2  FULL AUTO    (30-90 min) quick check + disk scan + DISM RestoreHealth + SFC. Walk-away.
     3  Disk surface test at next restart (chkdsk /r)
     4  Memory test (restarts the PC). Press F1 on the test screen, choose EXTENDED.
     5  Read the last memory test result
     6  WATCH: logs CPU, temperature, memory and disk every 30 seconds until it crashes
     7  Show the last readings before the crash
     8  COLLECT ALL LOGS into one zip (event logs, crash dumps, repair and driver logs, system snapshots).
        Options 1 and 2 do this automatically at the end. Bring the zip back for analysis. It is private to the customer.
     9  Open the report folder      0  Exit
   One plain-text REPORT-<date>.txt per run, in a folder named after the PC, next to this file.
   RAM-TEST-LOG.txt records which RAM sticks were fitted each time, so crashes can be matched to a stick.

B. WINDOWS WILL NOT START ("Your device ran into a problem and couldn't be repaired")
   1. Press Enter on that screen for other options.
   2. Troubleshoot > Advanced options > Command Prompt.
      (If it asks for a BitLocker recovery key: the customer's Microsoft account, aka.ms/myrecoverykey.)
   3. Plug in the stick. Type its letter and colon (D: then E: then F: ... until  dir  shows this folder).
   4. Type   RESCUE-FROM-RECOVERY-SCREEN.cmd
      1 shows WHY Windows failed, 2 checks the disk, 3 repairs system files, 4 undoes half-finished updates,
      5 rebuilds the boot files, 6 copies the crash evidence to the stick, 7 lists the drives.

ALSO
   - Dell's own test, no Windows needed: restart, tap F12, choose Diagnostics. Tests RAM, drive, fan. Write down the error code.
   - Test RAM one stick at a time, in the same slot, then swap the stick to the other slot.
   - Nothing here changes the PC except what you choose (DISM/SFC repairs, scheduling chkdsk, the memory test).

STRESS TEST  ->  2-RUN-STRESS.cmd
   Double-click, click Yes. Puts a controlled load on the CPU, memory and drive to try to make a flaky PC freeze or restart.
   Choose the load (1-4) and how long. Press Q to stop. A heartbeat log in the folder named after the PC shows when it died.
   The CPU temperature in this script is Windows' own sensor, which is unreliable on some PCs. Use HWiNFO for the real figure.
   When it stops it collects the Windows logs into a zip (if the PC freezes instead, run COLLECT-LOGS-ONLY.cmd after restarting).
