Skip to content

Commit

Permalink
Build: Add Windows 10 to MSI
Browse files Browse the repository at this point in the history
According to msdn [1]:
"When you install an .msi installation package on Windows 10 or Windows
Server 2016, the VersionNT value is 603." which is the same value for
Windows 8.1.
In order to differentiate between Windows 8.1 and Windows 10 the trick in
[2] was used.

[1] https://support.microsoft.com/en-us/help/3202260/versionnt-value-for-windows-10-and-windows-server-2016
[2] http://stackoverflow.com/questions/31932646/versionnt-msi-property-on-windows-10

Signed-off-by: Sameeh Jubran <[email protected]>
Signed-off-by: Dmitry Fleytman <[email protected]>
  • Loading branch information
Sameeh Jubran authored and Dmitry Fleytman committed Apr 3, 2017
1 parent 0cf33ff commit ae2d76c
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Tools/Installer/UsbDkInstaller.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
IncludeMinimum="no" IncludeMaximum="yes" />
</Upgrade>

<Property Id="WIN10FOUND" Secure="yes">
<DirectorySearch Id="searchSystem" Path="[SystemFolder]" Depth="0">
<FileSearch Id="searchFile" Name="advapi32.dll" MinVersion="6.3.10000.0"/>
</DirectorySearch>
</Property>

<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.UsbDkProgramFilesFolder)" Name="UsbDk Runtime Library">
<Directory Id="UsbDk_Directory" Name="UsbDk Runtime Library">
Expand Down Expand Up @@ -86,13 +92,22 @@
</Component>

<Component Id="UsbDk_81" Guid="{3C24F894-3604-41D0-9FC2-D6A3B3676A20}" Win64="$(var.UsbDkWin64)">
<Condition>VersionNT &gt;= 603</Condition>
<Condition>VersionNT = 603 AND NOT WIN10FOUND</Condition>
<?define SourceSubPath= "Win8.1$(var.Config)" ?>
<?define OsName= "81" ?>
<?include UsbDkFiles.wxi ?>
<?undef SourceSubPath ?>
<?undef OsName ?>
</Component>

<Component Id="UsbDk_10" Guid="{34AB6305-4379-4E32-A070-8B0612521AC8}" Win64="$(var.UsbDkWin64)">
<Condition>VersionNT &gt;= 603 AND WIN10FOUND</Condition>
<?define SourceSubPath= "Win10$(var.Config)" ?>
<?define OsName= "10" ?>
<?include UsbDkFiles.wxi ?>
<?undef SourceSubPath ?>
<?undef OsName ?>
</Component>
</Directory>
</Directory>
</Directory>
Expand Down Expand Up @@ -129,6 +144,7 @@
<ComponentRef Id="UsbDk_7" />
<ComponentRef Id="UsbDk_8" />
<ComponentRef Id="UsbDk_81" />
<ComponentRef Id="UsbDk_10" />
</Feature>
</Product>
</Wix>

0 comments on commit ae2d76c

Please sign in to comment.