【发布时间】:2020-10-16 06:21:20
【问题描述】:
我刚开始使用 WiX,但不幸的是我马上遇到了问题。
所以,我想将默认安装位置设置为,例如,`C:\Program Files (x86)\Vendor\App`,但我只设法设置为`C:\Program Files (x86)\App` ...我找不到任何相关的...
无论如何,这是“Product.wxs”代码:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"><?define ProjectManagementNF_TargetDir=$(var.ProjectManagementNF.TargetDir)?>
<Product Id="*" Name="AppName" Language="1033" Version="0.1.4.0" Manufacturer="Vendor" UpgradeCode="1f380795-2f0d-47fc-9950-9ab74ed5c1d9">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<UIRef Id="WixUI_InstallDir" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes"/>
<Feature Id="ProductFeature" Title="AppName" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentGroupRef Id="ProgramFilesFolder_files" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIR" Name="App"/>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLDIR">
<!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
<Component Id="ProductComponent">
// some registry stuff...
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="ProgramFilesFolder_files" Directory="ProgramFilesFolder">
// some stuff..
</ComponentGroup>
</Fragment>
</Wix>
任何帮助将不胜感激,
提前谢谢!!!
【问题讨论】:
标签: wix windows-installer