Skip to content

Fix NSIS installer launch preparation and document lifecycle behavior - #54

Merged
Marc-André Moreau (mamoreau-devolutions) merged 2 commits into
Devolutions:masterfrom
theKBro:fix/nullsoft-installer-wait
Oct 19, 2026
Merged

Marc-André Moreau (mamoreau-devolutions) merged 2 commits into
Devolutions:masterfrom
theKBro:fix/nullsoft-installer-wait

Conversation

@theKBro

Copy link
Copy Markdown
Contributor

Fixes NSIS/Nullsoft installation in both Rust and .NET by giving an already-downloaded, SHA-256-verified installer an .exe extension immediately before execution. The preparation applies only to nullsoft and the nsis alias, preserves an existing .exe extension, and preserves the verified bytes when replacing a stale staged executable.

The shared install-flow step is named PrepareInstallerForExecution in .NET and prepare_installer_for_execution in Rust. The name describes its role in the pipeline rather than a particular installer technology; this branch only adds NSIS/Nullsoft-specific behavior within that step.

The general download-filename changes from the initial investigation were removed. Download URLs, HTTP redirects, request headers, download --rename behavior, and other installer types are unchanged.

Root cause and .NET comparison

The container reproduction downloaded and verified NSIS 3.12 successfully, but the file was named download without an executable extension. Rust then remained inside the installer launch operation for the entire five-minute bound; the process snapshot showed no NSIS installer process. The existing "Waiting for nullsoft installer" progress message is emitted before dispatch, so it did not prove that NSIS had started or that the process-exit wait was stuck.

The same reproduction with unmodified .NET production code also failed. .NET returned Win32Exception (1008) from Process.StartWithShellExecuteEx while launching the extensionless download file, and Pinget exited with code 1. Thus both implementations had a launch-preparation problem; only Rust exhibited the observed hang.

Renaming the verified file to download.exe and executing it with /S.

Regression coverage

Adds Rust/.NET coverage for NSIS preparation, preservation of verified bytes, stale executable replacement, existing .exe names, missing payload errors, and unchanged behavior for other installer types. Retains the bounded lifecycle tests documenting that a detached child can outlive the launched installer process, plus the /S argument tests.

theKBro (theKBro) and others added 2 commits October 7, 2026 11:48
Apply cargo fmt to the NSIS preparation test and give the PowerShell
child in the lifecycle tests time to cold-start on loaded CI runners
(20s marker wait, 10s completion bound, 30s child lifetime), and run it
with -NonInteractive -ExecutionPolicy Bypass.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@mamoreau-devolutions
Marc-André Moreau (mamoreau-devolutions) merged commit c11b930 into Devolutions:master Oct 19, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants