2014-07-21 2 views
0

MSI 설치 프로그램에 VC++ 재배포 가능 패키지 선행 조건 설치를 포함하려고합니다.WiX - ExePackage 요소를 제품에 연결하는 방법

내가 수정 한 Fragment 조용히 레지스트리 검사를 수행 한 후 경우 vcredist_x64.exe 패키지를 다운로드하고 설치 this guy에 의해 작성 (파일 - MyWixProject/vcredist.wixobj) :

<?xml version="1.0" encoding="UTF-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> 
    <?define vcredist_x86="http://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe"?> 

    <Fragment> 
     <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\DevDiv\vc\Servicing\12.0\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DevDiv\vc\Servicing\12.0\RuntimeMinimum" Value="Install" Variable="vcredist" /> 
     <PackageGroup Id="vcredist"> 
      <PackageGroupRef Id="InstallVCRedist"/> 
      <ExePackage Id="vcredist_x86" 
         Cache="no" 
         Compressed="no" 
         PerMachine="yes" 
         Permanent="yes" 
         Vital="yes" 
         Name="Redist\vcredist_x86.exe" 
         SourceFile="Redist\vcredist_x86.exe" 
         DownloadUrl="$(var.vcredist_x86)" 
         InstallCommand="/q" 
         DetectCondition="vcredist AND (vcredist &gt;= 1)"> 
       <ExitCode Value ="3010" Behavior="forceReboot" /> 
      </ExePackage> 
     </PackageGroup> 
    </Fragment> 
</Wix> 

내가 이것을 참조하기 위해 노력하고 있어요 Fragment에서 내 Product 요소 (파일 MyWixProject/Product.wxs). 나는 그것을 읽었다 "The contents of a Fragment element can be linked into a product by utilizing one of the many *Ref elements". 그러나 또는 PackageGroupRefProduct 주 요소에서 참조 할 수 있습니까? 아니면 .wxsProduct?>

답변

1

ExePackage 내에서 .wixobjFragment를 컴파일하는 또 다른 방법은 번들이 아닌 제품 작동이있다. MSI는 동시에 여러 제품을 설치하지 않으며 VC++ 재배포 가능 패키지는 여러 제품이 포함 된 번들입니다.

+0

그래서 VC++ 재배포 가능 패키지와 내 패키지를 실행하는 번들을 만들어야합니까? – Elist

+0

오른쪽. 패키지가 여러 개인 경우 번들이 필요합니다. –

+0

또는 C++ redist를 병합 모듈로 추가 할 수 있습니다. http : //wixtoolset.org/documentation/manual/v3/howtos/redistributables_and_install_checks/install_vcredist.html –

관련 문제