From 45e88ff9e306b32ab555d2e255d79e8deea150bb Mon Sep 17 00:00:00 2001
From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
Date: Mon, 31 Aug 2026 19:04:58 -0400
Subject: [PATCH] fix(installer): WiX uninstall script paths
Resolve WiX driver uninstall actions to use the Windows folder and the packaged script file id instead of the install root path. This keeps deferred uninstall actions working when the install root is configurable or the installer is patched. The template also adds the WindowsFolder standard directory, and the Windows driver docs now describe the selected install root instead of the hardcoded default path.
---
.../libvirtualhid-driver-installer-patch.xml | 8 ++++----
cmake/packaging/wix_resources/wix.template.in | 1 +
docs/windows-driver.md | 4 ++--
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/cmake/packaging/wix_resources/libvirtualhid-driver-installer-patch.xml b/cmake/packaging/wix_resources/libvirtualhid-driver-installer-patch.xml
index 8b54ba9..f283dfe 100644
--- a/cmake/packaging/wix_resources/libvirtualhid-driver-installer-patch.xml
+++ b/cmake/packaging/wix_resources/libvirtualhid-driver-installer-patch.xml
@@ -13,14 +13,14 @@
Return="check"
Impersonate="no" />
diff --git a/cmake/packaging/wix_resources/wix.template.in b/cmake/packaging/wix_resources/wix.template.in
index e7f8cdd..9784ab2 100644
--- a/cmake/packaging/wix_resources/wix.template.in
+++ b/cmake/packaging/wix_resources/wix.template.in
@@ -27,6 +27,7 @@
+
diff --git a/docs/windows-driver.md b/docs/windows-driver.md
index b059c32..fd92d43 100644
--- a/docs/windows-driver.md
+++ b/docs/windows-driver.md
@@ -196,8 +196,8 @@ powershell -ExecutionPolicy Bypass -File .\scripts\windows\uninstall-driver.ps1
-LogPath .\cmake-build-windows-driver\uninstall-driver.log
```
-The WiX installer also places validation files under the default install root,
-`C:\Program Files\libvirtualhid`:
+The WiX installer places validation files under the selected install root, which
+defaults to `C:\Program Files\libvirtualhid`:
- `tools\windows\gamepad_adapter.exe`
- `tools\windows\virtualhid_control.exe`