Skip to content

Upgrade the installer to WiX v7 - #35

Merged
danielchalmers merged 2 commits into
masterfrom
wix-v7
Oct 28, 2026
Merged

danielchalmers merged 2 commits into
masterfrom
wix-v7

Conversation

@danielchalmers

@danielchalmers danielchalmers commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Changes

Rewrites Product.wxs for WiX 7.0.1 (from 6.0.2). It leans on the defaults WiX has added since v4 instead of spelling out the feature, media, upgrade table and component GUIDs.

  • Upgrades. MajorUpgrade replaces the hand-written Upgrade table and RemoveExistingProducts. The old version is still removed before the new one installs, in the same place in the sequence.
    • Downgrades are refused with "A newer version of Network Monitor is already installed." Today an older MSI silently replaces a newer install.
    • Same-version installs still replace each other, so one 0.0.0 build can replace another.
  • Start menu. The shortcut is now Programs\Network Monitor.lnk instead of Programs\Network Monitor\Network Monitor.lnk, so All apps lists the widget directly rather than as a folder holding one item. Upgrading removes the old folder.
  • Registry key path. The shortcut's HKCU key path moves from Software\Microsoft\Daniel Chalmers\Network Monitor to Software\Daniel Chalmers\Network Monitor, the key Radial Actions and Sentry Deck use. Upgrading removes the old key. The app doesn't read either key.
  • Start after install. The installer starts the widget through Explorer after it finishes, as Radial Actions does (Improve installation and update check logic RadialActions#87), so the widget gets the user's environment instead of the Windows Installer service's. As before, it starts only when the installer shows a window, not on silent installs.
  • Installed apps links to the project and its issues.
  • CI installs WiX 7.0.1 and drops -d MainExeSource. The package picks the exe from publish/<arch> by -arch, and still takes its version from the exe. WiX v7 won't build until its OSMF EULA is accepted, so the build passes -acceptEula wix7, which accepts it for that run only.

Also dropped, with no change in behavior:

  • Language="1033", so the package is language-neutral.
  • InstallerVersion="500" and SummaryInformation, both WiX's defaults now.
  • Secure="yes" on the ARP properties, which matters only for elevated installs.
  • The shortcut's Icon, since the exe has the same icon.
  • The exe's hand-picked component GUID. WiX generates a different one for each architecture, and the old version is removed before the new one installs, so a changed GUID can't strand a component.

Validation

  • dotnet test: 179 passed.

  • Built the MSIs locally with WiX 7.0.1 from Release publishes, using the commands in create-release-artifacts:

    • x64 and arm64 both build with no warnings.
    • As a baseline, WiX 7.0.1 builds master's Product.wxs into the same tables as WiX 6.0.2.
    • A table-by-table diff against master's package shows only the changes above.
    • wix msi validate on master's package reports ICE38, ICE61 and ICE64 errors and ICE69 and ICE91 warnings. On this one it reports only ICE38, which every per-user package with a file key path gets, and the ICE61 and ICE91 warnings.
  • Tested in Windows Sandbox with 4.1.1 packages built from this branch, against the 4.1.0 release:

    1. Full-UI upgrade from 4.1.0.
      • One product was left, 4.1.1.0, and a file next to the exe was kept.
      • The shortcut moved, and the old Start menu folder and registry key were removed.
      • Installed apps shows the version, icon and both links.
      • Explorer started the widget.
    2. Silent same-version reinstall: it replaced the previous build and didn't start the widget.
    3. 0.0.0 over 4.1.1: refused with exit 1603 and the downgrade message in the log.
    4. Uninstall removed the exe, shortcut and registry key. A fresh install and uninstall left no folder behind.
    5. Silent upgrade with the widget running. From 4.1.1 to 4.1.2, Restart Manager closed the widget, and as before a silent install doesn't start it again. A same-version reinstall leaves the running copy alone, as master's package does.
    6. Arm64 MSI on x64: refused with exit 1633.
  • Tested this PR's CI artifacts in the same sandbox:

    • The x64 and Arm64 MSIs have the same tables as the local builds, apart from the version and the files' sizes and hashes.
    • 0.0.0 over the 4.1.0 release was refused with exit 1603 and the downgrade message.
    • A fresh full-UI install showed 0.0.0.0, the icon and both links in Installed apps, created the shortcut and started the widget through Explorer.
    • A 0.0.0 package built locally from this branch replaced it silently and didn't start the widget.
    • Uninstalling removed the install folder, shortcut and registry key.
    • The Arm64 MSI was refused on x64 with exit 1633.

Not included

Arm64 itself (an Arm64 smoke test in CI) is a separate follow-up.

Rewrite Product.wxs as Package.wxs on WiX 7.0.1's defaults: the default
feature, generated component GUIDs, MajorUpgrade and an exe picked from
publish/<arch> by -arch. Downgrades are refused, the shortcut moves to the
top of the Start menu and the widget starts through Explorer after a
non-silent install.
@danielchalmers
danielchalmers merged commit 3e86bec into master Oct 28, 2026
1 check passed
@danielchalmers
danielchalmers deleted the wix-v7 branch October 28, 2026 17:44
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