Repository navigation
Releases: DC1024/PrinterStatusGuard
Release list
v1.1.4 · 离线提醒开关 + 单实例 + 不再静默开启自启 / Offline alert toggle + single instance
中文
排查「退出后仍弹提示」的结论:软件并没有退出——开机自启的计划任务在登录时拉起了一个后台实例(-Guard,隐藏在托盘),它每 30 秒轮询,打印机断电后连续 3 次无响应于是报警。
本次改动:
- 单实例互斥:手动启动时若后台已有实例,弹出明确提示(告诉你去托盘停止或退出),不再静默并存两个实例。
- 自启可见:由开机自启拉起时会弹一次气泡「已随开机自动启动,哨兵正在后台运行」,不再让人误以为没启动。
- 不再代你开启自启:旧的 HKCU Run 迁移只做清理,不再自动重建计划任务(此前若以管理员运行会被自动打开自启)。
- 新增「离线提醒」开关(设置页,默认关闭):打印机关机/断网时只写日志、不弹通知;卡纸/缺纸/缺墨等异常照常提醒,不受影响。
- 自检扩至 35 个用例(新增 2 项离线提醒开关行为);exe 189,952 B。
English
Diagnosis of "notifications after exit": the app had not exited — the auto-start scheduled task launched a hidden -Guard instance at logon, polling every 30 s; after the printer was powered off, 3 consecutive unreachable polls triggered the alert.
- Single instance: launching manually while a background instance exists now shows a clear message instead of silently duplicating.
- Visible auto-start: the auto-started instance announces itself with a balloon.
- No silent auto-start enabling: legacy Run migration only cleans up, never re-creates the task.
- New "离线提醒" (offline alert) toggle in Settings, off by default: printer powered off / unreachable is logged only; jam / empty paper / low toner alerts are unaffected.
- Self-test now 35 cases; exe 189,952 B.
下载 / Download: PrinterStatusGuard.exe 或 PrinterStatusGuard-v1.1.4-portable.zip。
v1.1.3 · 哨兵状态同步 + 设置页 / Sentinel state sync + Settings tab
中文
- 修复状态不同步:托盘右键开/停哨兵时,主界面按钮文字与托盘菜单(含对勾)现在实时同步。
- 新增「设置」页:开机自启(自路线B页移入)、自动检查更新开关、立即检查更新、打开配置/报告目录;与托盘菜单共用状态、双向实时同步。
- exe 重编译(185,856 B);无头自检 33 用例全过。
English
- Fixed state desync: starting/stopping the sentinel from the tray now syncs the main-window button text and shows a checkmark on the tray item.
- New Settings tab: auto-start (moved from Route B), auto update-check toggle, manual check button, open config folder — all kept in sync with the tray menu.
- exe rebuilt (185,856 B); headless self-test 33/33 pass.
下载 / Download: PrinterStatusGuard.exe(单文件免安装 / single portable file)或 PrinterStatusGuard-v1.1.3-portable.zip。
v1.1.2 · 检查更新功能 / Update check
中文
- 新增检查更新:托盘菜单 →「检查更新」,通过 GitHub Releases API 获取最新版本并做语义化版本比较,发现新版本可直接跳转下载页。
- 启动 15 秒后静默自动检查一次:仅在发现新版本时弹托盘气泡,失败不打扰。
- 自动检查可通过托盘 →「自动检查更新」关闭(写入 config.json,旧配置自动迁移,默认开启)。
- 无头自检扩至 33 个用例(新增 4 项版本比较);exe 重编译(178.5 KB)。
English
- Update check: tray → "检查更新" fetches releases/latest via the GitHub API, compares versions semantically, and offers to open the download page when a newer release exists.
- A silent auto-check runs ~15 s after startup (balloon only when a new version is found; failures are silent).
- Auto-check can be disabled via tray → "自动检查更新" (persisted in config.json; old configs migrated, default on).
- Headless self-test now covers 33 cases (4 new version-comparison cases).
下载 / Download: PrinterStatusGuard.exe(单文件免安装 / single portable file)或 PrinterStatusGuard-v1.1.2-portable.zip。
v1.1.1 · 开机自启修复(最高权限计划任务) / Auto-start fix (elevated scheduled task)
中文
修复「开机自启」:
- 旧版问题:自启写在 HKCU
Run键,exe 形态下路径解析错误指向.ps1,重启后静默失效,且从不申请管理员权限。 - 新方案:改用最高权限计划任务(登录触发、无时间限制)。勾选/点击「开机自启」时弹一次 UAC 授权,之后每次登录自动以管理员身份在托盘运行哨兵。
- 旧
Run条目会在升级后首次运行时自动清理;托盘菜单与界面复选框两处入口共用同一逻辑,操作后弹气泡反馈。 - 无头自检扩至 29 个用例;exe 重编译(177,664 B)。
English
- Old bug: auto-start wrote an HKCU
Runentry that, in exe form, pointed at the.ps1(wrong path resolution), silently failed after reboot, and never requested elevation. - New: a scheduled task with highest privileges (AtLogOn, no time limit). Toggling "auto-start" asks for admin once (UAC); afterwards the tray sentinel starts elevated at every logon.
- Legacy
Runentries are cleaned up automatically on first run; both toggle points share one routine with balloon feedback. - Headless self-test now covers 29 cases.
下载 / Download: PrinterStatusGuard.exe(单文件免安装 / single portable file)或 PrinterStatusGuard-v1.1.1-portable.zip。
v1.1.0 · 内置深度体检(WinPrintDiag 并入) / Built-in Deep Checkup (WinPrintDiag merged)
中文
- 打印机子系统「深度体检」内置:原独立工具 WinPrintDiag(已归档)整体并入,成为主界面第 4 个标签页。
- 一键只读扫描:打印服务状态、spoolsv 崩溃历史、打印组件签名完好性、打印机/端口/驱动配对(重复条目给出「建议保留 / 建议删除」、USB 挂 IPP 驱动错配)、打印队列堆积、近期补丁/软件/意外关机、打印审计日志开关。
- 报告自动落盘
%APPDATA%\PrinterStatusGuard\checkup\,支持另存;管理员可一键从组件存储(WinSxS)还原被替换的组件、备份式清理打印队列。 - 无头自检扩至 26 个用例(含一次真实深度体检)。
- exe 重新编译(171 KB,v1.1.0),README 与宣传页中英文同步更新。
English
- Built-in Deep Checkup: the standalone WinPrintDiag tool (now archived) is merged as the 4th tab.
- One-click read-only scan: Spooler state, spoolsv crash history, print-stack signature integrity, printer/port/driver pairing (duplicate entries with keep/remove advice, USB-on-IPP mismatch), queue backlog, recent patches/software/unexpected shutdowns, audit-log status.
- Reports are saved under
%APPDATA%\PrinterStatusGuard\checkup\and can be exported; admins can restore suspect binaries from WinSxS and clear the queue with backup. - Headless self-test now covers 26 cases (including a real deep-checkup run).
下载 / Download: PrinterStatusGuard.exe(单文件免安装 / single portable file)或 PrinterStatusGuard-v1.1.0-portable.zip。
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/