fix(system): correct sc.exe argument syntax, reg deletion, and ipv6 dns guard - #4966
fix(system): correct sc.exe argument syntax, reg deletion, and ipv6 dns guard#4966virtualtable wants to merge 3 commits into
Conversation
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe changes update IPv6 DNS handling, delayed service startup configuration, WSUS registry cleanup, and legacy configuration import processing. ChangesWindows utility maintenance
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@functions/private/Set-WinUtilService.ps1`:
- Line 36: Update the service configuration flow around sc.exe config in
Set-WinUtilService so it checks $LASTEXITCODE immediately after the command and
throws when the exit code is non-zero. Keep the success log only on the
successful path, allowing the existing catch handling to report configuration
failures.
In `@functions/public/Invoke-WPFImpex.ps1`:
- Around line 76-86: The legacy-import flattening logic around $flattenedJson
must exclude the metadata object represented by the Install property before
Update-WinUtilSelections is called, retaining only selection identifiers and
preserving flat-import behavior. Add a regression fixture that verifies legacy
and flat imports produce equivalent selections.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 9b64fa5d-4c41-4263-b7f5-9ee0229a183c
📒 Files selected for processing (4)
functions/private/Set-WinUtilDNS.ps1functions/private/Set-WinUtilService.ps1functions/public/Invoke-WPFFixesUpdate.ps1functions/public/Invoke-WPFImpex.ps1
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 60a541d1cf
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| foreach ($prop in $jsonFile.PSObject.Properties) { | ||
| if ($null -ne $prop.Value) { | ||
| $flattenedJson += @($prop.Value) |
There was a problem hiding this comment.
Skip legacy Install metadata when flattening imports
When a legacy config includes selected install apps, the legacy Install property contains package metadata objects while the checkbox keys are under WPFInstall (the removed flattening comment also excluded Install). This loop now appends every property value, so those metadata objects get passed to Update-WinUtilSelections, don't match any WPF* prefix, and leave $listName null before .Add(...), causing the import to error or leave only a partial selection; filter out Install or only flatten the checkbox-key groups.
Useful? React with 👍 / 👎.
|
@coderabbitai review |
|
|
@coderabbitai review |
|
|
Thanks for working on this. I raised the same concern on #4911, but a decision has not been made in #4877 about what backward compatibility should mean here. The backup format changed on February 17, almost six months ago. It is up to Chris to decide whether full compatibility is necessary or partial import is acceptable. This skips the old I also cannot verify this was tested. There is no legacy JSON fixture, import-path test, or example of the old input and expected selections. Finally, every provider in |
Description
Fixes sc.exe argument syntax, replaces invalid REG DELETE drive paths in Windows Update repair, guards IPv6 DNS configuration, and adds backward-compatibility for legacy JSON config imports.
Changes Included
Verification