Windows Installer奇怪的Appsearch结果检查RDP版本

时间:2017-11-26 03:03:32

标签: wix windows-installer rdp

我可能做错了什么?我的Windows Installer AppSearch在Windows 10上为RDP二进制文件获取的版本与Explorer / Properties和wmic报告的不同。

我们的产品需要最近的RDP,因此MSI使用AppSearch检查mstscax.dll的文件版本。奇怪的是它找到了6.3版本,而wmic和Explorer都将版本报告为10.0(在完全更新的Win 10系统上)。

使用wmic:

C:\Users\Alan> wmic datafile where name="C:\\windows\\system32\\mstscax.dll" get manufacturer, name, version
Manufacturer           Name                             Version
Microsoft Corporation  c:\windows\system32\mstscax.dll  10.0.15063.483

在资源管理器中右键单击该文件也会将版本显示为10.0.15063.483

但使用此WiX Appsearch代码失败:

    <Property Id="RDPVERSIONWIN10">
        <DirectorySearch Id="Win10RdpVer" Path="[System64Folder]">
            <FileSearch Name="mstscax.dll" MinVersion="6.4" />
        </DirectorySearch>
    </Property>
    <Condition Message="Appsearch for mstscax.dll failure">
        <![CDATA[Installed OR RDPVERSIONWIN10 ]]>
    </Condition>

条件只有 MinVersion =&#34; 6.3&#34; 才能成功。有趣/巧合的是,在Windows 7上,最新的RDP版本是6.3

我无法理解这一点......有人可以解释一下吗?

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

为了完整性,这里是我测试的所有(最小)wix代码

<?xml version='1.0' encoding='utf-8'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>

<!-- testing appsearch for mstscax.dll - weird result on Win10 -->

    <Product Name='Foobar 1.0' Manufacturer='Acme Ltd.'
        Id='8DA5E740-A17F-4B5C-9305-28622608455A'
        UpgradeCode='97B91883-D329-4A31-AF11-29BB7DA1775F'
        Language='1033' Codepage='1252' Version='1.0.0'>

        <Package Id='*' Keywords='Installer' Description="Acme's Foobar 1.0 Installer"
            Comments='Foobar is a registered trademark of Acme Ltd.' Manufacturer='Acme Ltd.' Platform="x64"
            InstallerVersion='400' Languages='1033' Compressed='yes' SummaryCodepage='1252' />

        <Property Id="RDPVERSIONWIN10">
            <DirectorySearch Id="Win10RdpVer" Path="[System64Folder]">
                <FileSearch Name="mstscax.dll" MinVersion="6.4" />
            </DirectorySearch>
        </Property>
        <Condition Message="Appsearch for mstscax.dll failure">
            <![CDATA[ Installed OR RDPVERSIONWIN10 ]]>
        </Condition>

        <Media Id='1' Cabinet='Sample.cab' EmbedCab='yes' DiskPrompt="CD-ROM #1" />
        <Property Id='DiskPrompt' Value="Acme's Foobar 1.0 Installation [1]" />

        <Directory Id='TARGETDIR' Name='SourceDir'>
            <Directory Id='ProgramFilesFolder' Name='PFiles'>
                <Directory Id='Acme' Name='Acme'>
                    <Directory Id='INSTALLDIR' Name='Foobar 1.0'>
                        <Component Id='MainExecutable' Guid='C256A4D0-2F98-401B-B53A-9892D3FFABB9'>
                            <File Id='FoobarEXE' Name='FoobarAppl10.exe' DiskId='1' Source='FoobarAppl10.exe' KeyPath='yes'/>
                        </Component>
                    </Directory>
                </Directory>
            </Directory>
        </Directory>

        <Feature Id='MainExecutable' Level='1'>
            <ComponentRef Id='MainExecutable' />
        </Feature>

  </Product>
</Wix>

使用Orca的Fwiw显示MSI表中的值与WiX代码正确匹配。

0 个答案:

没有答案