I am working on a windows installer project. And now I only want the software only can be installed on Windows 7 or Windows Server 2008 R2 system, I tried to use this:
You can use the MsiNTProductType property to detect if it is a server os. In combination with the NT version check you can check if you have Windows Server 2008R2. This would look like the following: