我想替换我的安装程序已安装的文件。在下面的代码中,“OneCoreFiles”组件应该第一次安装文件(这正在工作)并且组件“ConfigCopyFile”应该替换该配置文件。
但是代码没有按预期工作。首先执行组件“ConfigCopyFile”,然后执行“OnecoreFiles”。我希望它以另一种方式工作。
我还在学习 WIX,并认为 Feature 元素中的组件是按照它们声明的顺序执行的。
代码片段:
<Component Id="ConfigCopyFile" Guid="{98E61055-5A84-4003-90D1-7A67677D7465}">
<Condition>CONFIGFILEEXISTS</Condition>
<CopyFile Id="ConfigFileId" SourceProperty="CONFIGFILEEXISTS" DestinationProperty ="INSTALLDIR"/>
</Component>
<Feature Id="ProductFeature" Title="OneCore Features" Level="1">
<ComponentRef Id="LogEntries" />
<ComponentGroupRef Id="OneCoreFiles" />
<ComponentRef Id="AppDBConfiguration" />
<ComponentRef Id="SqlServerConfiguration" />
<ComponentRef Id="OracleConfiguration" />
<ComponentRef Id="IISConfiguration" />
<ComponentRef Id="ConfigCopyFile" />
</Feature>
这一定很容易解决。我是不是错过了什么。请指教。