收到Wix安装程序错误代码2343以进行简单配置。 (WIX新手)

时间:2014-01-23 12:01:22

标签: wpf wix windows-installer

使用以下简单的WIX配置时,我收到以下错误。正在安装的应用程序是WPF。

产品:Web Miner安装程序 - 安装程序在安装此程序包时遇到意外错误。这可能表明此包装存在问题。错误代码是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 Installer Error Log

1 个答案:

答案 0 :(得分:5)

您应该将INSTALLLOCATION替换为不动产(在您的情况下为INSTALLFOLDER)