BSIS

Uninstaller

Native receipt-verified removal without keeping the original Setup.exe.

Private, experimental implementation

The installed native uninstaller is part of the private BSIS prototype. It has not been publicly released, registered with Windows Apps & Features or audited for production deployment.

Installed Uninstall.exe

Every new BSIS prototype installation contains a native Uninstall.exe in the installation root. It is built from the Rust runtime portion of Setup.exe without duplicating the compressed application payload.

This solves an early usability problem: users no longer need the original Setup.exe, which could disappear if Windows had extracted it temporarily from a ZIP.

How to uninstall

You may double-click Uninstall.exe and confirm, or run the installed executable from PowerShell:

PowerShell · remove a test installation
& "$env:LOCALAPPDATA\BSIS-Hello-Test\Uninstall.exe" uninstall --target "$env:LOCALAPPDATA\BSIS-Hello-Test" --yes

Use the actual installation path you chose. For a file in your current PowerShell folder, prefix it with a dot and backslash. For a quoted full path, prefix it with the & call operator.

The old Setup.exe uninstall --target command remains supported, including for installations made before this native uninstaller was added.

Optional graphical uninstaller (Windows)

For installations created with the updated BSIS runtime, the standalone uninstaller also includes an offline WebView2 removal window. No compressed Setup.exe package is needed:

PowerShell · GUI uninstall from the installed app
& "$env:LOCALAPPDATA\BSIS-Hello-Test\Uninstall.exe" gui

Or open PowerShell in the installation folder and run .\Uninstall.exe gui. Double-clicking Uninstall.exe still uses console confirmation for compatibility.

The window shows the installed product, version, publisher, destination and tracked-file count. BSIS checks the installation receipt and file hashes before displaying the preview, and rechecks everything immediately before removal. If files are missing or modified, it shows a warning or a refusal message rather than silently deleting them. A missing or invalid receipt prevents the preview from launching at all.

Click Uninstall to remove tracked application files. The core engine runs on a worker thread, so the window stays responsive. Cancel closes without making changes, until removal begins. Once removal starts, the close button is disabled to prevent exiting mid-operation; there is no cancellation or rollback during deletion in this prototype.

The GUI cannot supply an arbitrary directory or shell command: it always operates on the folder containing the running Uninstall.exe. Only the uninstall and close messages are accepted by the native host. After success, close the window to let Windows finish best-effort self-cleanup.

Requirements: Windows 10/11 and the Microsoft Edge WebView2 Runtime. Run gui --dev only when testing the UI with WebView2 Developer Tools. Without WebView2, use the existing console mode. Interactive GUI testing is still needed before a production release.

What BSIS removes

The engine reads the receipt file and verifies the recorded hashes before removing tracked files only. The receipt now also stores the installed Uninstall.exe's size and SHA-256 checksum.

  • If a tracked payload file changed, nothing is deleted.
  • If the managed Uninstall.exe changed, nothing is deleted.
  • If unrelated user files are present, they are preserved and the installation directory remains.
  • If everything was removed successfully, BSIS attempts to clean up the installation directory.

A checksum detects changes; it does not prove who published the executable.

Removing a running uninstaller on Windows

Windows cannot reliably delete a running executable. An early BSIS build failed with OS error 32 after deleting the installed application files because it tried to remove its own directory while Uninstall.exe was still running.

The corrected engine leaves that folder in place for post-exit cleanup. It launches a best-effort worker using built-in Windows PowerShell from System32, waits for Uninstall.exe to fully exit (including any Press Enter prompt), retries deleting only the uninstaller, then attempts to remove the installation folder without recursive deletion. A folder containing unrelated user files is preserved.

The worker starts in the parent directory rather than inside the installation folder, preventing it from holding the folder open.

If Windows PowerShell is unavailable or blocked by security policy, tracked application files can still be removed but the uninstaller itself may remain. The console warns when it cannot start cleanup. This lifecycle is not yet a hardened native cleanup service.

Still missing

  • Windows Apps & Features / Add or Remove Programs registration.
  • Repair, update, per-machine uninstall and UAC support.
  • Robust recovery after power loss or concurrent hostile filesystem changes.
  • Code signing, publisher verification and stable installer metadata.

These are future milestones. See Security model and Roadmap.