Wix安装程序在简单配置中出现错误代码2343。(WIX新手)

3

使用以下简单的WIX配置安装WPF应用程序时,我遇到了以下错误:

产品:Web Miner Installer -- 安装程序在安装此软件包时遇到意外错误。这可能表示该软件包存在问题。错误代码为2343。参数为:,,

<?xml version="1.0" encoding="UTF-8"?>
    <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
        <Product Id="*" Name="Application Title" Language="1033" Version="1.0.0.0" Manufacturer="Avant Prime" UpgradeCode="855a8b6e-c576-41e2-8118-8f3511613478">
            <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

            <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
            <MediaTemplate />

            <Feature Id="ProductFeature" Title="Application Title" Level="1">
                 <ComponentGroupRef Id="ProductComponents" />
            </Feature>

            <UIRef Id="WixUI_InstallDir" />
            <Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />

            <DirectoryRef Id="ShortcutFolder">
                  <Component Id="ShortcutsComponent" Feature="ProductFeature" Guid="{B40F2C3F-CACC-4196-8F8F-C0F6B082404E}">
                        <CreateFolder Directory="ShortcutFolder" />

                        <RemoveFolder Id="RemoveShorcutFolder" Directory="ShortcutFolder" On="uninstall" />

                        <Shortcut Id="UninstallProduct" 
                                  Name="Uninstall xxxxxxx"
                                  Target="[System64Folder]msiexec.exe"
                                  Arguments="/x [ProductCode]"
                                  Directory="ShortcutFolder"
                                  Description="Uninstalls xxxxxxx"/>

                        <RegistryValue Id="RegistryShortcut" 
                                       Root="HKCU" 
                                       Key="SOFTWARE\xxxxxx\settings" 
                                       Name="Shortcut" 
                                       Value="1" 
                                       Type="integer" 
                                       KeyPath="yes" />
                   </Component>
            </DirectoryRef>

            <PropertyRef Id="NETFRAMEWORK45" />
            <Condition Message="This setup requires the .NET Framework 4.5.1 to be installed.">
                  Installed OR NETFRAMEWORK45
            </Condition>
    </Product>

    <Fragment>
           <Directory Id="TARGETDIR" Name="SourceDir">
                  <Directory Id="ProgramMenuFolder">
                         <Directory Id="ShortcutFolder" Name="xxxxxx"></Directory>
                  </Directory>

                  <Directory Id="ProgramFilesFolder">
                         <Directory Id="INSTALLFOLDER" Name="xxxxxxx" />
                  </Directory>
           </Directory>
    </Fragment>

    <Fragment>
           <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
                  <Component Id="ProductComponent">
                        <File Source="$(var.MyApplication.TargetPath)" />
                  </Component>
            </ComponentGroup>
    </Fragment>
</Wix>

我错过了什么或者做错了什么吗?

这里是请求的日志信息。由于文件较大,我附上了一个链接。

WIX安装程序错误日志


1
你能提供日志吗?msiexec /l*v log.txt /i your.msi - leshy84
1
我已经将日志添加到问题中。 - Observer
1个回答

6

您应该将 INSTALLLOCATION 替换为实际属性(在您的情况下是 INSTALLFOLDER)。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接