Reader small image

You're reading from  WiX Cookbook

Product typeBook
Published inJan 2015
Reading LevelBeginner
Publisher
ISBN-139781784393212
Edition1st Edition
Languages
Right arrow
Author (1)
Nicholas Matthew Ramirez
Nicholas Matthew Ramirez
author image
Nicholas Matthew Ramirez

Nick Ramirez is a software developer living in Columbus, Ohio. As a believer that deployment shouldn't be terrifying, he has become a big fan of technologies such as WiX. His other related interests include build automation, software architecture, and playing Minecraft. Nick lives with his wife and two cats.
Read more about Nicholas Matthew Ramirez

Right arrow

Installing only to supported versions of Windows


Once we're confident that our application works on a particular version of Windows, we may want to prevent users from installing to other unsupported operating systems. Here, we can use a launch condition. Launch conditions evaluate the state of the user's system and then cancel the installation if our requirements aren't met. By checking the operating system version, we can save the end user from trying to use our software on a system it was never intended for.

Getting ready

Create a new setup project and name it SupportedWindowsInstaller.

How to do it...

Add a launch condition that checks the VersionNT property to see what the computer's version of Windows is:

  1. Add a Condition element inside the Product element. Its Message attribute will explain that the current operating system is not supported, as follows:

    <Condition Message="Only Windows 8 and up is supported">
    </Condition>
  2. Add a conditional statement inside that element that compares...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
WiX Cookbook
Published in: Jan 2015Publisher: ISBN-13: 9781784393212

Author (1)

author image
Nicholas Matthew Ramirez

Nick Ramirez is a software developer living in Columbus, Ohio. As a believer that deployment shouldn't be terrifying, he has become a big fan of technologies such as WiX. His other related interests include build automation, software architecture, and playing Minecraft. Nick lives with his wife and two cats.
Read more about Nicholas Matthew Ramirez