<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:netfx='http://schemas.microsoft.com/wix/NetFxExtension'>
<Bundle Name="IPDev" Version="0.6" Manufacturer="MYAPP Corporation" UpgradeCode="f380ae43-5df1-4cfe-9297-526e3e638e57">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<!-- TODO: Define the list of chained packages. -->
<PackageGroupRef Id="Netfx45FullPackage"/>
</Chain>
</Bundle>
<Fragment>
<!--checking for matlab 2012a installation-->
<util:RegistrySearch Id="MatlabPath"
Variable="UniqueId"
Root="HKLM"
Key="SOFTWARE\MathWorks\MATLAB\4.17\"
Result="exists"
Win64="yes"
/>
<!--checking for matlab MCR 2012a 64 bit installation-->
<util:RegistrySearch Id="MatlabMCRPath"
Variable="UniqueId"
Root="HKLM"
Key="SOFTWARE\MathWorks\MATLAB Compiler Runtime\7.17\"
Result="exists"
Win64="yes"
/>
<PackageGroup Id="Netfx45FullPackage">
<ExePackage Id="Netfx45Xxx" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="no" InstallCommand="/q"
SourceFile="..\SetupProject\dotnetfx45_full_x86_x64.exe"
DetectCondition="(Netfx4FullVersion="4.5.50709") AND (NOT VersionNT64 OR (Netfx4x64FullVersion="4.5.50709"))"
InstallCondition="(VersionNT >= v6.0 OR VersionNT64 >= v6.0) AND (NOT (Netfx4FullVersion="4.5.50709" OR Netfx4x64FullVersion="4.5.50709"))"/>
<ExePackage Id="MatlabMCR2012a64" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="no" InstallCommand="/q"
SourceFile="..\SetupProject\MCR_R2012a_win64_installer.exe"
InstallCondition="(NOT MatlabPath) OR (NOT MatlabMCRPath)"/>
<MsiPackage Id="IPDev" Cache="no" Compressed="no" DisplayInternalUI="yes" Vital="yes" SourceFile="..\SetupProject\bin\Release\IPDevSetup.msi"/>
</PackageGroup>
</Fragment>
</Wix>
여기 내 코드 : 내 문제는 .NET4.5가 설치된 경우에만 설치된다는 것입니다.
그러나 MATLAB의 MCR은 존재 여부와 관계없이 설치됩니다.
wix installer 3.7 부트 스트 래퍼 레지스트리 검색
DetectCondition="MatlabMCRPathExists OR MatlabPathExists"
이 조건은 당신이 할 수있는
감사 .i가 DetectCondition으로 변경되었지만 MatLab MCR 설치를 건너 뜁니다. MCR을 제거하고 내 컴퓨터를 다시 시작했습니다. 이것은 로그 파일입니다 : "조건 '(MatlabPath가 아님) AND (NOT MatlabMCRPath)'가 참으로 평가됩니다." 또한 "Detected package : MatlabMCR2012a64, state : Present, cached : None"은 레지스트리가 아직 있음을 의미합니다. 또는 내 코드에 버그가 있습니까? – Gilad
나는 내 조건을 OR로 바꾸었고 이것이 'MatlabMCRPathExists 또는 MatlabPathExists'조건이 거짓으로 평가되는 조건입니다. 그러나 MCR이 설치되었습니다. – Gilad
ok nvm 항상 유형과 같았습니다. 고마워요. – Gilad