无法在Wix 1.10中添加Secure InstallDir

问题描述 投票:-1回答:2

环境:Windows 7 x86 SP1,Wix工具集3.10

下面是安装程序wxs忽略INSTALLDIR。

Installer wxs ignoring INSTALLDIR

这是WiX XML:

<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*" Name="HelloWix Sample 1.0" Language="1041" Version="1.0.0" 
           Manufacturer="CM" UpgradeCode="PUT-GUID-HERE" Codepage="932">
    <Package Description="Simple Message to standard output" 
             Comments="This installer database contains the logic and data required
     to install HelloWix Sample." InstallerVersion="200" Compressed="yes"
     SummaryCodepage="932" />
    <Media Id="1" Cabinet="simple.cab" EmbedCab="yes" />
    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder" Name="PFiles">
        <Directory Id="hellowix" Name="hellowix">
          <Component Id="HelloWix.cmd" Guid="*">
            <File Id="HELLOWIX.CMD" Name="HelloWix.cmd" Source="HelloWix.cmd" />
          </Component>
        </Directory>
      </Directory>
    </Directory>
    <Feature Id="DefaultFeature" Title="Main Feature" Level="1">
      <ComponentRef Id="HelloWix.cmd" />
    </Feature>
    <UI />
    <UIRef Id="WixUI_InstallDir" />
    <Property Id="WIXUI_INSTALLDIR" Value="hellowix" />

    <!--Added the following line:-->
    <Property Id="INSTALLFOLDER" Secure="yes" />

  </Product>
</Wix>

我认为这是http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Installer-ignores-InstallDir-directory-change-td6677782.html的一个相关主题。所以我只添了一行;到下一行Property Id =“WIXUI_INSTALLDIR”,如上图所示:

    <!--Added the following line:-->
    <Property Id="INSTALLFOLDER" Secure="yes" />

Adding property

然后我的安装程序得到错误代码2343 ...有什么问题?

xml windows wix windows-installer
2个回答
0
投票

你可以查找Windows Installer Error Messages on MSDN

错误2343表示“指定的路径为空”。请参阅上面的链接,或从Windows SDK安装中获取msi.chm(在ProgramFiles下搜索)。使该帮助文件可用于快速检索其他信息和MSI SDK信息是非常实用的。我相信它的安装文件夹中还包含了WiX的副本。


如评论中所述,请尝试将对话框设置为使用<UIRef Id="WixUI_Mondo" />而不是当前设置的<UIRef Id="WixUI_InstallDir" />。我相信这些对话框中可能存在一些错误。当天我被告知要使用Mondo,我记得我遇到的问题消失了。我不记得问题是什么了。

请先说明一下,如果您使用测试结果向问题中添加新信息,我将“演变”此答案。

或许也看到我为另一个问题写的这个答案。它非常相似,它是用于编译测试MSI的最小WiX文件,它使用Mondo GUI:WiX installer msi not installing the Winform app created with Visual Studio 2017


您的问题可能与您所在的日语系统有关。如果是这样,帮助WiX创建者为所有用户可靠地解决问题至关重要。


0
投票

如果您有另一个系统(或虚拟机)可以对其进行测试,那么请执行此操作。使用WiX源,此问题在我的Windows 10 x64英语系统上无法重现。此外,ICE验证报告没有错误。

如果它在另一个系统上运行,那么您的测试系统很可能在某种程度上受损,最可能的原因是Shell文件夹条目在某处不正确或损坏。真正使用的唯一目录是32位ProgramFilesFolder,因此可能在某个地方被破坏。我已经在以某种方式破坏标准目录位置的值之前看到过这个问题,并且当Windows Installer评估它们时它们变为空,因此出现2343错误。

© www.soinside.com 2019 - 2024. All rights reserved.