Skip to content

feat: interactive installer (#6) - #27

Merged
zcsizmadia merged 3 commits into
mainfrom
feat/installer
Aug 28, 2026
Merged

zcsizmadia merged 3 commits into
mainfrom
feat/installer

Conversation

@zcsizmadia

Copy link
Copy Markdown
Collaborator

Implements the installer (#6): scripts/install.ps1 gets wsldrive to the point where, after a reboot, the drive(s) mount automatically with no manual tweaking — and it confirms every choice with the user first (drive letter, distro, paths, whether to restart WSL).

What it does

All the elevation-time / one-time steps are performed by the installer, not the user:

  • installs binaries to Program Files
  • checks for / chain-installs WinFsp (-WinFspMsi), Direction A only
  • registers the Hyper-V socket service GUIDs (reuses register-hvsocket.ps1)
  • runs wsl --shutdown once, with explicit confirmation
  • registers an at-logon scheduled task per direction that mounts on every boot and re-discovers the dynamic WSL VM GUID each time
  • stages the Linux binary into the distro for Direction B

The only thing the user supplies is what to mount where.

UX

  • Interactive by default — prompts with sensible defaults (auto-picks a free drive letter, the default distro), then a single review-and-confirm gate before applying.
  • -Unattended for scripted installs, -DryRun to print the full plan changing nothing, -Uninstall to remove tasks + registration + binaries.
  • Idempotent; self-elevates preserving all args.

Validated end-to-end via -DryRun for both directions, uninstall, and the elevation relaunch. Parses clean. (A real install mutates the system, so that is left for a deliberate elevated run.)

README gains an Install section documenting the guided flow.

Generated with Claude Code

Zoltan Csizmadia and others added 3 commits August 28, 2026 13:07
scripts/install.ps1 sets wsldrive up so that after a reboot the drive(s)
mount automatically with zero manual tweaking, and confirms every choice
with the user first (drive letter, distro, paths, whether to restart WSL).

The installer performs all the elevation-time steps itself:
- installs binaries to Program Files
- checks for / chain-installs WinFsp (--WinFspMsi), Direction A only
- registers the Hyper-V socket service GUIDs (reuses register-hvsocket.ps1)
- runs `wsl --shutdown` once, with confirmation
- registers an at-logon scheduled task per direction that mounts on every
  boot and re-discovers the dynamic WSL VM GUID each time
- stages the Linux binary into the distro for Direction B

Interactive by default; -Unattended for scripted installs, -DryRun to
preview the full plan without changing anything, -Uninstall to remove
tasks + registration + binaries. Idempotent; self-elevates preserving args.

README: new Install section documenting the guided flow.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds an optional Windows wizard installer alongside the script. The GUI
collects the same choices (directions, drive letter, distro, paths,
hvsocket, WSL-restart consent) and then hands off to install.ps1
-Unattended, which stays the single source of truth. The script remains
fully usable on its own for CI / locked-down machines / preference.

- installer/wsldrive.iss: Inno Setup 6 script — custom wizard pages
  (directions, Direction A/B settings with runtime distro discovery),
  lays binaries into Program Files, runs install.ps1 at ssPostInstall,
  registers uninstall (install.ps1 -Uninstall). x64, admin manifest.
- scripts/build-installer.ps1: compiles the .iss with ISCC (offers to
  install Inno Setup via winget with -InstallInno). Output:
  installer/dist/wsldrive-setup.exe.
- install.ps1: add -NoShutdown (installer drives the WSL restart itself)
  and -LinuxBin (stage the Direction B Linux client); skip the binary
  copy when BinDir == InstallDir (installer already placed them).
- README Install section documents GUI + script; .gitignore installer/dist.

Note: the .iss could not be compile-tested in this environment (Inno Setup
not installed); the install.ps1 handoff was validated end-to-end via -DryRun.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add .github/workflows/release.yml: on a v* tag (or manual dispatch) it
builds the Linux client, builds the Windows binaries against the WinFsp
SDK, compiles the Inno Setup installer, and publishes a GitHub Release
with wsldrive-setup.exe, wsldrive-windows-x64.zip (raw binaries + script),
and wsldrive-linux-x64. Verifies mount support is actually linked so a
release can't silently ship a mount-less build.

README: restructure Install into three routes ordered by convenience —
(1) download wsldrive-setup.exe from Releases, (2) run install.ps1 from
the zip, (3) build the installer from source — noting all three do the
same thing since the GUI just drives the script.

Note: release.yml and the .iss are not yet exercised end-to-end (needs a
tag / an Inno Setup toolchain); the install.ps1 logic they invoke is
dry-run validated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@zcsizmadia
zcsizmadia merged commit b2b7a1a into main Aug 28, 2026
3 checks passed
@zcsizmadia
zcsizmadia deleted the feat/installer branch August 28, 2026 19:03
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