From 9216a7561c599084f6f071060d6524d2e3f3faf2 Mon Sep 17 00:00:00 2001 From: Fredrik Orderud Date: Thu, 13 Mar 2025 14:35:40 +0100 Subject: [PATCH] Add documentation on how to block installation... ...based on OS versions Attempt on addressing wixtoolset/issues#8785 by extending the WiX documentation to also cover an OS version check that I believe is quite common. --- src/content/docs/wix/tools/launch-conditions.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/content/docs/wix/tools/launch-conditions.md diff --git a/src/content/docs/wix/tools/launch-conditions.md b/src/content/docs/wix/tools/launch-conditions.md new file mode 100644 index 0000000..47e1f24 --- /dev/null +++ b/src/content/docs/wix/tools/launch-conditions.md @@ -0,0 +1,16 @@ +--- +title: Launch conditions +--- + +# How To: Block installation based on OS version + +It's common to want to block installers from running on old versions of Windows. The following sample blocks installation on versions of Windows earlier than Windows 10 version 21H1. You can choose different minimum versions by replacing `19044` with a different version number. + +```xml + + + + +``` + +The sample uses the `SOFTWARE\Microsoft\Windows NT\CurrentVersion\CurrentBuildNumber` registry key to detect the current Windows version.