简单项目上的 Wix 安装程序错误 2343
Wix Installer Error 2343 on simple project
我的 Visual Studo 2013 中有 Product.wxs:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define ProductName="Soft" ?>
<?define ProductVersion="1.0.0.0" ?>
<?define ProductCode="*" ?>
<?define UpgradeCode="49996E7A-4717-4577-BA6A-3501BBDFF1A0" ?>
<?define Manufacturer="Soft LLC" ?>
<Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="$(var.ProductName)" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" ></Property>
<WixVariable Id="WixUILicenseRtf" Overridable="yes" Value="License.rtf"/>
<UIRef Id="WixUI_InstallDir"/>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="$(var.ProductName)"/>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="ProductComponent">
<File Id='SoftEXE' DiskId='1' Source='C:\Projects\Soft Installer\Browser\soft.exe'/>
</Component>
</ComponentGroup>
</Fragment>
</Wix>
我添加了 WixUIExtension。
我构建了安装程序并 运行 它。但是在许可协议对话框之后出现错误 2343。
我的系统和软件:
- Windows 服务器 2012 R2
- Visual Studio 2013 社区 2013
- Wix 工具集 3.9.1208
我错过了什么或做错了什么?
这里是请求的日志信息。它很大,所以我附上了 link.
您的 "WIXUI_INSTALLDIR" Value="INSTALLLOCATION"
需要 INSTALLFOLDER
,这应该可以解决问题。
...
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER"></Property>
<UIRef Id="WixUI_InstallDir"/>
</Product>
FWIW,我会看一下 http://iswix.codeplex.com/ ... 我维护的这个 FOSS 项目具有高级项目模板,可作为脚手架和图形设计器来完成大部分繁重的工作。它包括 MajorUpgrade、UI 和其他在创建项目时默认的体验,这样您就不必浪费时间尝试让它工作。稍后你可以回过头来阅读并更详细地理解它。
我的 Visual Studo 2013 中有 Product.wxs:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<?define ProductName="Soft" ?>
<?define ProductVersion="1.0.0.0" ?>
<?define ProductCode="*" ?>
<?define UpgradeCode="49996E7A-4717-4577-BA6A-3501BBDFF1A0" ?>
<?define Manufacturer="Soft LLC" ?>
<Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate />
<Feature Id="ProductFeature" Title="$(var.ProductName)" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" ></Property>
<WixVariable Id="WixUILicenseRtf" Overridable="yes" Value="License.rtf"/>
<UIRef Id="WixUI_InstallDir"/>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="$(var.ProductName)"/>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="ProductComponent">
<File Id='SoftEXE' DiskId='1' Source='C:\Projects\Soft Installer\Browser\soft.exe'/>
</Component>
</ComponentGroup>
</Fragment>
</Wix>
我添加了 WixUIExtension。
我构建了安装程序并 运行 它。但是在许可协议对话框之后出现错误 2343。
我的系统和软件:
- Windows 服务器 2012 R2
- Visual Studio 2013 社区 2013
- Wix 工具集 3.9.1208
我错过了什么或做错了什么?
这里是请求的日志信息。它很大,所以我附上了 link.
您的 "WIXUI_INSTALLDIR" Value="INSTALLLOCATION"
需要 INSTALLFOLDER
,这应该可以解决问题。
...
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER"></Property>
<UIRef Id="WixUI_InstallDir"/>
</Product>
FWIW,我会看一下 http://iswix.codeplex.com/ ... 我维护的这个 FOSS 项目具有高级项目模板,可作为脚手架和图形设计器来完成大部分繁重的工作。它包括 MajorUpgrade、UI 和其他在创建项目时默认的体验,这样您就不必浪费时间尝试让它工作。稍后你可以回过头来阅读并更详细地理解它。