-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add installer diagnostics guide for triaging update issues #47105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,93 @@ | ||||||||||
| # PowerToys Installer & Update Diagnostics | ||||||||||
|
|
||||||||||
| A step-by-step guide for diagnosing installer and update issues reported by users. | ||||||||||
|
|
||||||||||
| ## Quick Reference: Key Files | ||||||||||
|
|
||||||||||
| | File/Folder | Path | Contains | | ||||||||||
| |---|---|---| | ||||||||||
| | UpdateState.json | `%LOCALAPPDATA%\Microsoft\PowerToys\UpdateState.json` | Persisted update state machine | | ||||||||||
| | Runner logs | `%LOCALAPPDATA%\Microsoft\PowerToys\RunnerLogs\runner-log_*.log` | Startup, update checks, cleanup | | ||||||||||
| | Update logs | `%LOCALAPPDATA%\Microsoft\PowerToys\UpdateLogs\update-log_*.log` | PowerToys.Update.exe activity | | ||||||||||
| | Updates folder | `%LOCALAPPDATA%\Microsoft\PowerToys\Updates\` | Downloaded installer files | | ||||||||||
|
|
||||||||||
| > **Note:** These paths use `%LOCALAPPDATA%` (per-user AppData) regardless of whether PowerToys was installed per-user or per-machine. The data/settings location is always per-user. | ||||||||||
|
|
||||||||||
| ## Update State Values | ||||||||||
|
|
||||||||||
| From `src/common/updating/updateState.h` (`UpdateState::State` enum): | ||||||||||
|
|
||||||||||
| | Value | Name | Meaning | | ||||||||||
| |---|---|---| | ||||||||||
| | 0 | upToDate | No update needed | | ||||||||||
| | 1 | errorDownloading | Download or install failed, will retry | | ||||||||||
| | 2 | readyToDownload | New version found, not yet downloaded | | ||||||||||
| | 3 | readyToInstall | Installer downloaded, waiting for user action | | ||||||||||
| | 4 | networkError | GitHub API call failed | | ||||||||||
|
Comment on lines
+20
to
+26
|
||||||||||
|
|
||||||||||
| --- | ||||||||||
|
|
||||||||||
| ## Symptom: Old update installers accumulating on disk | ||||||||||
|
|
||||||||||
| ### What to ask the user for | ||||||||||
|
|
||||||||||
| 1. Contents of `UpdateState.json` | ||||||||||
| 2. Runner logs (last few days from `RunnerLogs\`) | ||||||||||
| 3. Update logs (from `UpdateLogs\`, if they exist) | ||||||||||
| 4. List of files in `Updates\` folder (names + sizes) | ||||||||||
|
|
||||||||||
| ### Step 1: Check the running version | ||||||||||
|
|
||||||||||
| In runner logs, look for the startup line: | ||||||||||
|
|
||||||||||
| ``` | ||||||||||
| [info] Scoobe: product_version=v0.XX.X last_version_run=v0.XX.X | ||||||||||
| ``` | ||||||||||
|
|
||||||||||
| - **If version < v0.73.0**: The pre-download cleanup (PR #27908) is missing. Each downloaded installer accumulates because cleanup only runs at startup when state is `upToDate`. Ask the user to manually upgrade to the latest version. | ||||||||||
| - **If version >= v0.73.0**: The pre-download cleanup exists. Accumulation should not happen under normal conditions. Continue to Step 2. | ||||||||||
|
|
||||||||||
| ### Step 2: Check UpdateState.json | ||||||||||
|
|
||||||||||
| ```json | ||||||||||
| {"state": 3, "downloadedInstallerFilename": "powertoyssetup-0.98.1-x64.exe", ...} | ||||||||||
|
||||||||||
| ```json | |
| {"state": 3, "downloadedInstallerFilename": "powertoyssetup-0.98.1-x64.exe", ...} | |
| ```jsonc | |
| {"state": 3, "downloadedInstallerFilename": "powertoyssetup-0.98.1-x64.exe" /* additional fields may be present */} |
Copilot
AI
Apr 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Markdown table also starts rows with ||, which can cause incorrect rendering. Using a single leading | per row will keep the table readable in GitHub and other renderers.
Copilot
AI
Apr 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same || table formatting problem here. Additionally, the Evidence cell uses state: 3 while earlier examples use \"state\": 3; keeping the JSON key format consistent (and valid JSON) will reduce confusion for readers extracting the value from UpdateState.json.
| | State stuck at `readyToInstall` (pre-v0.73) | `state: 3` in UpdateState.json, no UpdateLogs | Manually upgrade to latest | | |
| | State stuck at `readyToInstall` (pre-v0.73) | `"state": 3` in UpdateState.json, no UpdateLogs | Manually upgrade to latest | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Markdown table syntax is incorrect: each row starts with
||, which typically renders as an extra empty column (or a malformed table) in many Markdown renderers. Use a single leading|for each row (and alignment row) so the table renders correctly.