Release COM DLLs before installer test MSI operations#40093
Merged
benhillis merged 2 commits intofeature/wsl-for-appsfrom Apr 3, 2026
Merged
Release COM DLLs before installer test MSI operations#40093benhillis merged 2 commits intofeature/wsl-for-appsfrom
benhillis merged 2 commits intofeature/wsl-for-appsfrom
Conversation
added 2 commits
April 2, 2026 18:13
Add PrepareForMsiOperation() that calls CoFreeUnusedLibrariesEx(0) before each msiexec invocation. This releases in-process COM DLLs like wslserviceproxystub.dll loaded by prior test classes, preventing the Restart Manager from detecting the test process as holding file locks and failing the install on older Server SKUs like ni_release.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Windows installer test suite to proactively unload unused in-proc COM servers before invoking msiexec, mitigating Restart Manager “file-in-use” detection that can terminate the test process on older Windows/Server SKUs.
Changes:
- Added a helper (
PrepareForMsiOperation) that callsCoFreeUnusedLibrariesEx(0, 0)to release unused in-process COM DLLs. - Invoked this helper before MSI install/uninstall operations and before installing a downloaded GitHub release when the asset is an
.msi.
JohnMcPMS
approved these changes
Apr 3, 2026
OneBlue
approved these changes
Apr 3, 2026
benhillis
added a commit
that referenced
this pull request
Apr 3, 2026
* Release COM DLLs before installer test MSI operations Add PrepareForMsiOperation() that calls CoFreeUnusedLibrariesEx(0) before each msiexec invocation. This releases in-process COM DLLs like wslserviceproxystub.dll loaded by prior test classes, preventing the Restart Manager from detecting the test process as holding file locks and failing the install on older Server SKUs like ni_release. * fix CoFreeUnusedLibrariesEx --------- Co-authored-by: Ben Hillis <[email protected]>
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.
This is a follow-up to #40080 to resolve a test failure on older Windows OS versions.
Call CoFreeUnusedLibrariesEx before each msiexec invocation. This releases in-process COM DLLs like wslserviceproxystub.dll loaded by prior test classes, preventing the Restart Manager from detecting the test process as holding file locks and being terminated.