Skip to content

Require WinFsp 2.2.26286 and offer to install it at startup - #253

Merged
coldhighsun merged 1 commit into
mainfrom
feat/winfsp-2.2.26286-auto-install
Oct 13, 2026
Merged

coldhighsun merged 1 commit into
mainfrom
feat/winfsp-2.2.26286-auto-install

Conversation

@coldhighsun

Copy link
Copy Markdown
Owner

Summary

  • Bump WinFsp to 2026 Beta5 (2.2.26286) in winfsp.net, the Inno Setup installer, CI and docs.
  • At startup, compare the installed winfsp-msil.dll with the required version instead of only checking for 2.2.x.
    • Missing: ask whether to install it; declining exits.
    • Older: ask whether to update; declining (or a failed update) continues and is remembered per installed/required pair (AppConfiguration.SkippedWinFspVersion).
    • Newer: accepted silently, no downgrade is offered.
  • New WinFspInstaller takes the MSI from the portable ZIP's prerequisites\ folder or downloads it, verifies a pinned SHA256 through a handle that stays open while elevated msiexec runs (no swap between check and run), and maps exit codes (success, reboot required, UAC declined, failure). Downloads are capped and msiexec has a timeout.
  • The Inno Setup installer now replaces an older WinFsp with its bundled MSI; CI puts the MSI into the portable ZIP only (the installer keeps its own copy).

Test plan

  • dotnet build and dotnet test tests/ManagedDrive.Tests (new WinFspPrerequisiteTests / WinFspInstallerTests)
  • Verified a real msiexec /a runs normally while the MSI is held open read-shared, and that the pinned SHA256 matches the Beta5 MSI
  • Start the app on a machine with an older WinFsp and accept the update (UAC) end to end
  • Start the app with WinFsp uninstalled; decline, and accept
  • Compile installer/ManagedDrive.iss with iscc (not available locally) and run the release workflow

Known gaps

  • No progress UI or cancel while the MSI downloads/installs (the check runs before the splash).

🤖 Generated with Claude Code

Bump WinFsp to 2026 Beta5 (2.2.26286) in the NuGet package, installer and CI.

At startup the app now compares the installed winfsp-msil.dll with the
required version. A missing runtime or an older one offers to install the
MSI: it is taken from the portable ZIP's prerequisites folder or downloaded,
verified against a pinned SHA256 through a handle kept open during the run,
then executed elevated with msiexec. A newer WinFsp is accepted, and a
declined or failed update of an older one is remembered per installed and
required version. Only a missing runtime is fatal.

The Inno Setup installer now replaces an older WinFsp with its bundled MSI,
and the portable ZIP carries the MSI.
@coldhighsun
coldhighsun merged commit d75fb4c into main Oct 13, 2026
5 checks passed
@coldhighsun
coldhighsun deleted the feat/winfsp-2.2.26286-auto-install branch October 13, 2026 15:48
@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 44.76744% with 95 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/ManagedDrive.App/App.xaml.cs 0.00% 45 Missing ⚠️
src/ManagedDrive.App/Services/WinFspInstaller.cs 60.00% 39 Missing and 1 partial ⚠️
...rc/ManagedDrive.App/Services/WinFspPrerequisite.cs 62.96% 10 Missing ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant