Repository navigation
Offer to install WebView2, with an administrator prompt, on Windows - #4
Merged
beingsuz merged 1 commit intoSep 26, 2026
Merged
Conversation
kirie now shows web wallpapers on Windows in Microsoft Edge WebView2, a system component that Windows 11 ships and most Windows 10 machines have. For the ones that do not, haru can now install it. haru reads the runtime's version from the registry, where Microsoft's guidance says to look. When it is missing, the install-kirie prompt offers to install it too, and Settings > Renderer has an Install WebView2 button. Either one downloads Microsoft's Evergreen bootstrapper, refuses to run it unless it carries a valid Authenticode signature from Microsoft Corporation, and runs it through Start-Process -Verb RunAs, so Windows puts up its administrator prompt and the runtime is installed for every account. Declining the prompt is reported as that, and a failed WebView2 install never undoes a good kirie install. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QJnt7JtdtiqnVCP9GYqUhK
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by beingsuz · project thread
Before: on Windows, web wallpapers could not run at all, and nothing in haru knew what they would need.
After: kirie shows web wallpapers on Windows in the Microsoft Edge WebView2 Runtime. When a machine does not have it, the install-kirie prompt offers "Also install WebView2, for web wallpapers", and Settings › Renderer shows whether it is installed, with an Install WebView2… button. Either one downloads Microsoft's installer, and Windows puts up its administrator (UAC) prompt before it runs.
The downloaded installer is run as administrator, so haru checks it first: it must carry a valid Authenticode signature from Microsoft Corporation, or it is not run.
How:
haru_apply::webview2::installed()reads the runtime'spvvalue from the registry keys Microsoft's guidance names (per-machine, both registry views, and per-user). It treats an empty value or0.0.0.0as not installed.install()downloads the Evergreen bootstrapper from Microsoft's fwlink. A PowerShell script then checks it withGet-AuthenticodeSignatureand runs it withStart-Process -Verb RunAs -Waitand/silent /install. A declined prompt, a bad signature and a failed installer each come back as their own message.How it was tested
cargo fmt --all,cargo clippy --workspace --all-targets -- -D warningsandcargo test --workspaceare clean on Linux.x86_64-pc-windows-gnu.regoutput (including the leftover-key cases) and that the script checks the signature before it elevates, including a path containing a quote.Not tested: nothing here has run on Windows. In particular, the UAC prompt, the signature check and the bootstrapper's
/silent /installhave not been seen working.🤖 Generated with Claude Code
https://claude.ai/code/session_01QJnt7JtdtiqnVCP9GYqUhK
Generated by Claude Code