Skip to content

LorenzoBoschi/PCSnapshot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PCSnapshot

Full system audit before a data migration — one EXE, zero install, HTML report on the desktop. Know exactly what you're moving before you move it.

Platform Language Status License


Important — before you run it The tool reads the Windows registry, user profile folders, and browser data directories. It requires no admin privileges but must be run on the target machine (not remotely). Antivirus software may flag the auto-generated EXE — this is a false positive caused by PyInstaller's bootloader pattern.


Why this exists

Every IT technician who has ever migrated a user from one PC to another knows the drill: you sit down at the old machine and start a mental checklist. How big is the profile? Is there an Outlook PST buried somewhere? Are they on POP3 or IMAP? Any management software with local databases? What about browser bookmarks and extensions the user "absolutely needs"?

You forget something. You always forget something. The PST was 12 GB and you didn't budget time. The accountant had Danea Easyfatt with a local archive on a USB stick. The Firefox profile had 40 bookmarks nobody mentioned.

PCSnapshot replaces that mental checklist with a single executable. Drop it on the desktop, double-click, wait two minutes, and get a complete HTML report covering system info, installed apps, user data weight, disk anomalies, management software, email configuration, and browser profiles. The report is self-contained (inline CSS, no JavaScript, no external dependencies), read-only (nothing on the source machine is modified), and the EXE self-destructs after execution.


Screenshots

Terminal showing 8-phase live progress

Live terminal output with 8 numbered phases

HTML report header and system info

Report header with system information

Installed applications table

Installed applications with version and size

User profile weight breakdown

User profile weight with AppData warning

Disk C analysis with anomaly detection

Disk C: analysis with anomalous items

Email configuration with account type badges

Outlook detection with IMAP/POP3/Exchange badges

Browser profiles with bookmarks

Browser profiles, bookmarks, and logged-in accounts

Browser extensions list

Installed browser extensions

The UI labels are in Italian — the tool is designed for Italian IT technicians. English localization is on the roadmap.


What it does

1. System information

Reads SMBIOS data from the registry, detects domain/workgroup membership via NetGetJoinInformation, identifies the exact Windows version (with automatic Win10 → Win11 correction for builds ≥ 22000).

2. Installed applications

Scans three registry uninstall paths (HKLM 64-bit, HKLM WOW6432Node, HKCU) and deduplicates by display name. Reports name, version, publisher, install date, and estimated size.

3. User profile weight

Recursively scans Desktop, Documents, Downloads, Pictures, Videos, Music, and AppData using os.scandir (faster than os.walk). Flags AppData if it exceeds 50% of the total profile — a common surprise during migrations.

4. Disk C: analysis

Reports total/used/free space and scans the root of C:\ for anomalous items — anything that isn't a standard Windows directory. Catches rogue installations like C:\Danea, C:\Mexal, or orphaned folders left by uninstallers.

5. Management software detection

Detects 9 Italian management/ERP systems via dual verification (registry keys + filesystem paths): Danea Easyfatt, TeamSystem, Zucchetti, Fatture in Cloud, Gestionale 1, Passepartout/Mexal, Panthera, Metodo, AS400 Client Access. Also scans ProgramData and C:\Users for database files (.mdb, .accdb, .fdb, .gdb, .mdf) and checks connected USB drives for management software backups.

6. Email configuration

Outlook: detects version (2003–365), enumerates profiles and accounts with recursive registry scanning, classifies account type (POP3 / IMAP / Exchange-M365), locates PST files and reports their size. Decodes UTF-16-LE binary registry fields. Thunderbird: reads profiles.ini, calculates profile weight.

7. Browser profiles

Detects Chrome, Edge, Firefox, Opera, and Brave. For each browser, enumerates profiles, extracts the logged-in Google/Microsoft account, parses bookmarks (Chromium JSON or Firefox places.sqlite via temp copy to avoid lock conflicts), and lists extensions with localized name resolution from _locales/.

8. Common apps checklist (in development)

Interactive checkbox section in the HTML report for tracking which apps need to be installed on the new machine.


Requirements

  • OS: Windows 10 or Windows 11 (any edition)
  • Runtime: None if using the compiled EXE; Python 3.10+ if running the .py directly
  • Privileges: Standard user (no admin required)
  • Dependencies: psutil (optional — the tool falls back to Win32 API via ctypes if psutil is unavailable)
  • Internet: Not required — the tool is fully offline

Installation and usage

Option A — Compiled EXE (recommended for field use)

  1. Copy Analisi Pre-Trasferimento Dati.exe to the target machine's desktop
  2. Double-click to run
  3. Watch the progress in the terminal window (8 numbered phases)
  4. The HTML report opens automatically in the default browser
  5. The EXE self-destructs after execution

Option B — Run from source

pip install psutil          # optional but recommended
python pcsnapshot.py

Build the EXE yourself

pip install pyinstaller
pyinstaller --onefile --console --name "PCSnapshot" --hidden-import=psutil pcsnapshot.py

The output lands in dist/PCSnapshot.exe (~9 MB).


Architecture

pcsnapshot.py                   # single-file, ~1400 lines
├── System info module          # winreg + ctypes (NetAPI32, Shell32, Kernel32)
├── Installed apps module       # registry enumeration, 3 uninstall paths
├── User profile scanner        # os.scandir recursive with live progress counter
├── Disk analyzer               # psutil or ctypes.GetDiskFreeSpaceExW fallback
├── Management software finder  # registry + filesystem dual detection
│   ├── USB drive scanner       # removable drive detection + 2-level folder search
│   └── Database file scanner   # .mdb/.accdb/.fdb/.gdb/.mdf in ProgramData + Users
├── Email analyzer              # Outlook registry deep scan + Thunderbird profiles.ini
├── Browser profiler            # Chromium JSON + Firefox SQLite + extension manifest parser
├── HTML report generator       # inline CSS, zero JS, standalone output
├── Console progress system     # 8 phases with timestamps, counters, per-phase timing
└── Self-delete mechanism       # async batch script with ping delay (EXE only)

Notable technical choices

  • Single file, no classes. The entire tool is one Python file with module-level functions. This is intentional: it compiles to a single EXE with no import resolution issues, and the code maps 1:1 to the 8 report sections — easy to maintain by any technician who knows basic Python.

  • os.scandir over os.walk for size calculation. os.scandir returns DirEntry objects that carry cached stat results on Windows (via FindFirstFile/FindNextFile), avoiding a separate os.stat syscall per file. On profiles with 200K+ files, this cuts scan time significantly.

  • psutil is optional with full ctypes fallback. Disk space uses GetDiskFreeSpaceExW, drive enumeration falls back to probing drive letters A–Z. This means the compiled EXE works even if psutil fails to bundle correctly.

  • Firefox SQLite via temp copy. Firefox keeps places.sqlite locked while running. The tool copies it to a temp file, reads it, then deletes the copy — avoiding both lock conflicts and any modification to the original.

  • UTF-16-LE binary decoding for Outlook registry. Outlook stores email addresses and PST paths as raw bytes in the registry. The tool decodes them as UTF-16-LE with null-byte stripping, falling back to Latin-1 if decoding fails.

  • Win10 → Win11 registry correction. Microsoft's registry still reports "Windows 10" for Windows 11 machines. The tool checks CurrentBuild ≥ 22000 and patches the display string accordingly.

  • Self-delete via async batch with ping delay. The EXE can't delete itself while running. A detached cmd.exe /c process runs a batch script that waits ~2 seconds (via ping 127.0.0.1 -n 3), then deletes both the EXE and the batch file. Only triggers when sys.frozen is True (compiled mode).

  • Live progress counter with \r overwrite. During heavy filesystem scans, a module-level counter updates every 3,000 files on the same terminal line, giving the technician real-time feedback without flooding the console.


Console output

When running the compiled EXE, you see a live terminal with 8 numbered phases:

======================================================================
   PCSnapshot  -  Pre-migration system analyzer
======================================================================
   Start    : 24/05/2026 14:23:01
   Computer : PC-CLIENT
   User     : mario.rossi
======================================================================

[14:23:01] === PHASE 1/8: System information ===
          Reading BIOS registry and Windows domain...
          Model      : Dell Inc. — Latitude 5420
          Windows    : Windows 11 (Build 22631, Version 23H2)
          [OK] System info collected  (0.2s)

[14:23:01] === PHASE 2/8: Installed applications ===
          Reading registry: HKLM, HKLM\WOW6432Node, HKCU...
          Applications found : 127
          Estimated total    : 14.32 GB
          [OK] 127 apps found  (1.1s)

...

======================================================================
   ANALYSIS COMPLETE
======================================================================
   Total time : 124.7 seconds
   Report     : C:\Users\mario.rossi\Desktop\Analisi_PC-CLIENT_20260524.html
======================================================================

Troubleshooting

The EXE doesn't start / Windows SmartScreen blocks it

The EXE is not code-signed. Right-click → "Run anyway", or unblock it via Properties → General → Unblock checkbox.

The EXE doesn't self-delete after running

Common causes: (1) the file is on a OneDrive-synced folder — OneDrive holds locks and may re-download the file; (2) antivirus blocks the cleanup batch script; (3) the 2-second delay isn't enough for PyInstaller's bootloader to release the file. Workaround: copy the EXE to C:\Temp\ before running.

Outlook accounts show "N/D" for type

This happens when the Outlook profile uses a non-standard MAPI provider or when the account was configured via Autodiscover without leaving the usual registry breadcrumbs. The email address is still detected correctly.

The scan takes more than 5 minutes

Large user profiles (especially AppData with browser caches) can contain hundreds of thousands of files. Watch the live counter in the terminal — if it's still incrementing, the tool is working. On very slow HDDs, a full scan can take 10+ minutes.


Roadmap

  • English localization for the HTML report
  • Extract management software list to external JSON config
  • Add printer and network share detection
  • Add Windows license and activation status
  • PDF export option alongside HTML
  • Configurable "common apps" checklist populated from a template file

License

MIT — see LICENSE.


Author

Lorenzo Boschi Built to streamline PC-to-PC data migrations in the field — born from forgetting one too many Outlook PST files.

About

Zero-install Windows system analyzer for IT technicians — full pre-migration audit in one EXE, HTML report on the desktop.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages