Repository navigation
PrinterStatusGuard v1.0.0
PrinterStatusGuard v1.0.0 — 首个正式版 / First stable release
一个免安装、单文件的 Windows 小工具,解决「打印机卡纸 / 缺纸 / 缺墨时 Windows 毫无提示」的问题。
中文
两条互补路线
- 路线 A(治本) —— 给打印机的「标准 TCP/IP 端口」启用 SNMP(需管理员),让 Windows 原生显示缺纸 / 缺墨。
- 路线 B(兜底) —— 常驻托盘的 IPP 哨兵(可选开机自启),轮询打印机 631 端口,异常时弹 Toast 通知,并叠加 SNMP 交叉确认。
本次包含的修复与能力
- 新增「日志(诊断)」标签页:记录 IPP 原始原因、SNMP 原始位域、合并结果与通知触发;支持
全部 / Info / Warning / Error等级筛选。 - 双通道合并:IPP 与 SNMP 结果合并判定,
media-jam/paper-jam判 Critical,厂商自定义位也不会漏报。 - 迟滞防抖(解决「扫描后频繁弹『恢复正常』」):异常立即上报并去重;「离线」与「已恢复」均需连续 3 次稳定轮询才通知。
- 修复 SNMP 单 bit 解码被 PowerShell 拆成标量、导致真实告警被静默破坏的隐藏 bug。
- 修复 ps2exe 打包后脚本目录回落到当前工作目录的问题(影响开机自启注册与相对路径写文件)。
- 自定义多尺寸应用图标;自检用例扩展至 23 个,全部通过。
安装:下载 PrinterStatusGuard.exe 放到任意目录双击即可。要求 Windows 10/11 + .NET Framework 4.x + PowerShell 5.1。
自检:命令行运行 PrinterStatusGuard.exe -SelfTest,输出 失败用例数: 0 即正常。
更新 exe 前请注意:关闭主窗口只是最小化到托盘,进程仍在——请右键托盘图标 → 退出,否则文件被占用无法覆盖。
English
A portable, single-file Windows utility that fixes "my printer jammed / ran out of paper and Windows never told me".
Two complementary routes
- Route A (root fix) — enable SNMP on the printer's Standard TCP/IP Port (admin required) so Windows shows paper/toner status natively.
- Route B (fallback) — a resident IPP sentinel in the tray (optional auto-start) polling port 631, firing Toast notifications on anomalies, cross-checked against SNMP.
What's in this release
- New Diagnostics log tab: records raw IPP reasons, raw SNMP bit fields, the merged verdict and notification triggers; filter by
All / Info / Warning / Error. - Merged channels: IPP and SNMP results are combined;
media-jam/paper-jamare Critical, and vendor-specific bits are never dropped. - Hysteresis (fixes "spams 'recovered' after every scan"): anomalies fire immediately and are de-duplicated; "offline" and "recovered" each need 3 consecutive stable polls.
- Fixed a silent bug where single-bit SNMP decoding was unrolled into a scalar by PowerShell, corrupting real alerts.
- Fixed the script directory falling back to the current working directory under ps2exe (broke auto-start registration and relative paths).
- Custom multi-size app icon; self-test expanded to 23 cases, all passing.
Install: download PrinterStatusGuard.exe, put it anywhere and double-click. Requires Windows 10/11 + .NET Framework 4.x + PowerShell 5.1.
Self-test: run PrinterStatusGuard.exe -SelfTest; 失败用例数: 0 means everything is fine.
When updating: closing the window only minimizes to the tray and the process keeps running — right-click the tray icon → Exit first, otherwise the file is locked and cannot be replaced.
Files / 文件
PrinterStatusGuard.exe— 主程序,单文件便携版 / main executable, portable single filePrinterStatusGuard-v1.0.0-portable.zip— 便携包:exe + cmd 启动器 + README + 图标 / portable bundle: exe + cmd launcher + README + iconapp.ico— 应用图标源文件 / application icon source
宣传页面 / Landing page: https://dc1024.github.io/PrinterStatusGuard/