feat: backup, rollback и remote user fixes / backup, rollback and remote user repairs - #2
Merged
Merged
Conversation
OneDeadMachine-Dev
marked this pull request as ready for review
August 14, 2026 06:50
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.
???????
??? ??????????
???????? backup ? ?????
state.clixml,manifest.json, ???????????.reg-????? ? ??????????restore.ps1?%ProgramData%\W-Fix\Backups.????????? ???????????????? ???????? ?? ????????? ??
0x00000709? ?????? ???????? ?? ????????? ?????? ?? ????????? ???????????????? ???????? ? HKCU WinRM-??????????????.HKEY_USERS\<SID>; ????? ???????? ? ???? ?? ???????.WScript.Network, PrintUI ? ???????? default-???????? ??????????? ????????????? ??????? Task Scheduler ?LogonType=Interactive?RunLevel=Limited, ??? ??????? ??? ?????????? ?????? ????????????.[ERROR], UTF-8 ??????, ??????? ????????? ??????/?????? ? ?????????????? ??????? ??? ??????.rundll32??????????? ?? exit code, ? ????? ?????????? ?????????????? ??????????? default-?????????.Device?UserSelectedDefault? ??????????? ?????????.?????????? UI ? CI
checkout@v7?setup-dotnet@v6.??????
WinRM ????????? PowerShell ? ????????? ????????? ??????????????. ??? per-user ???????? ?????? ??? ???????? ???????????? HKCU ? ????????????? ??????? ??????? ???????????????? COM/PrintUI ????????. ???? ????????? ???????????????? ? ???????????????? ????, ????????? ??????????? ??????? ? ????????? ???????? ????????? ?????? ??????? ? ????? ??????? ???????.
????????
dotnet test W-Fix.sln -c Release --no-restore? 17/17win-x64? ???????git diff --check? ???????English
What changed
Targeted backup and rollback
state.clixml,manifest.json, required.regexports, and a standalonerestore.ps1under%ProgramData%\W-Fix\Backups.Real remote interactive-user context
0x00000709and default-printer fixers no longer run per-user work against the WinRM administrator's HKCU.HKEY_USERS\<SID>; rollback remains bound to the same profile.WScript.Network, PrintUI, and default-printer verification run through a short-lived Task Scheduler job usingLogonType=InteractiveandRunLevel=Limited, without requesting or storing the user's password.[ERROR]validation, UTF-8 output capture, temporary task/file cleanup, and cancellation cleanup.rundll32exit codes and the actual resulting default printer are verified.DeviceandUserSelectedDefault.UI and CI reliability
checkout@v7andsetup-dotnet@v6.Why
WinRM runs PowerShell in an administrator service context. For per-user printing settings this means the wrong HKCU and no reliable access to the user's COM/PrintUI session. This patch separates administrative and interactive-user steps, preserves registry reversibility, and validates the actual result instead of trusting command invocation alone.
Validation
dotnet test W-Fix.sln -c Release --no-restore? 17/17 passedwin-x64publish ? passedgit diff --check? passed