Harden PowerShell execution and fixer reliability / Повысить надёжность W-Fix - #1
Merged
Merged
Conversation
OneDeadMachine-Dev
marked this pull request as ready for review
August 14, 2026 05:54
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.
Русский
Что изменилось
PowerShellExecutionResult, который различает успешное выполнение, ошибку, ненулевой exit code и таймаут.powershell.exeзавершается вместе с дочерними процессами.[ERROR]теперь корректно делают операцию неуспешной, даже если PowerShell-скрипт перехватил исключение.0x00000002,0x00004005,0x0000007eи IPP учитывают результаты всех выполненных шагов.pnputilи больше не сообщает об успешной переустановке, если драйвер не найден.Почему
Раньше CancellationToken не останавливал уже запущенный PowerShell, таймаут внешнего процесса фактически игнорировался, а перехваченные внутри скриптов ошибки могли завершаться ложным
Success. Некоторые многошаговые фиксеры также учитывали только последний шаг.Изменения сохраняют рабочие обходы проблем Windows Printing, но делают их результат предсказуемым и честным.
Влияние
Проверка
git diff --check: успешно.English
What changed
PowerShellExecutionResultthat distinguishes success, errors, non-zero exit codes, and timeouts.powershell.exeprocesses are terminated together with their child processes.[ERROR]output now correctly fails an operation even when the PowerShell script catches the underlying exception.0x00000002,0x00004005,0x0000007e, and IPP now account for every executed step.pnputilexit code and no longer reports a successful reinstall when no matching driver exists.Why
Previously, CancellationToken did not stop an already-running PowerShell operation, the external process timeout was ineffective, and errors caught inside scripts could still produce a false
Success. Several multi-step fixers also based their final result only on the last step.This change keeps the practical Windows Printing workarounds while making execution and reporting deterministic and trustworthy.
Impact
Validation
git diff --check: passed.