Repository navigation
fix(bootstrap): retry the Windows extraction elsewhere when innoextract cannot write - #190
Merged
Merged
Conversation
…ct cannot write The preflight probe runs as PowerShell, so it cannot see blocks that judge innoextract.exe, such as Controlled Folder Access. Staging directories inside a folder that Controlled Folder Access protects are now skipped while it blocks, and a failed extraction is retried in the next staging location (up to three attempts) before the install stops. The final error lists each location and, with Controlled Folder Access on, names the Windows Security setting and the extractor to allow. Candidate staging parents that differ only by a trailing separator, such as the temp folder and its unshortened 8.3 form, are now one entry. The staging test no longer leaves optimum-ix-* directories in the temp folder, and it covers the new behavior.
Zaldaryon
marked this pull request as ready for review
October 30, 2026 19:20
This was referenced Oct 30, 2026
Closed
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.
Follow-up to #189. The preflight there creates the deepest installer path from PowerShell, so it cannot see blocks that judge
innoextract.exeitself, such as Controlled Folder Access. This change handles that case instead of stopping the install.What changes on Windows:
Get-MpPreferenceneeds a running Defender service and, for the folder list, admin rights.bootstrap.ps1runs the extraction throughInvoke-ExtractWithStageFallback. Wheninnoextractexits non-zero, the staging directory is removed and the next location is tried, up to three attempts. If all fail, the error lists each location with its exit code. With Controlled Folder Access on, it also names the Windows Security page (Ransomware protection, Allow an app through Controlled folder access) and theinnoextract.exepath to allow.scripts/tests/extract-stage-root.ps1leftoptimum-ix-*directories in the temp folder after each run. It now removes them.Testing, on Windows 11:
scripts/tests/extract-stage-root.ps1passes under Windows PowerShell 5.1 and PowerShell 7. The new checks cover Controlled Folder Access at 0, 1, 2 and unreadable, protected-folder matching (including a sibling with a shared name prefix), retry order, the attempt limit, cleanup of failed attempts, and the first-attempt error keeping its-VanillaDiradvice. Removing the protected-folder skip, the retry, or the exclusion list each makes the suite fail.bootstrap.ps1ran end to end under both hosts against the cached 1.22.7 installer: 122 patches applied, 0 failed, no staging directory left behind.Invoke-ExtractWithStageFallbackand the real innoextract 1.13.0, a simulated block on the temp folder made the first attempt fail and the second extract all 20,096 files underD:\.Not covered: I could not turn Controlled Folder Access on (no admin rights, Defender service not answering), so the block was simulated and the registry read was only checked against an absent key. The 8.3 check in the test is skipped on volumes without 8.3 names, which includes the one I tested on, so the Windows CI run is the first place it executes.