지연된 사용자 지정 작업에서 설치 위치 속성을 가져올 수 없습니다 InstallDir - PRIMARYFOLDER
대신에 http://blogs.technet.com/b/alexshev/archive/2008/03/25/property-does-not-exist-or-empty-when-accessed-from-deferred-custom-action.aspx내가 링크 읽은 후이 코드를 작성했습니다
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Module Id="MergeModule1" Language="1033" Version="1.0.0.0">
<Package Id="cffa568e-1bf0-4eb3-bee3-eb5801a0bbd0" Manufacturer="Microsoft" InstallerVersion="200" />
<Binary Id="myCustomActionsDLL" SourceFile="CustomAction1.CA.dll" />
<CustomAction Id="SetProperty" Execute="immediate"
Property="CA_myCustomAction"
Value="InstallDir=[PRIMARYFOLDER];SourceDir=[SourceDir]" />
<CustomAction
Id="CA_myCustomAction"
BinaryKey="myCustomActionsDLL"
DllEntry="CustomAction1"
Execute="deferred" Impersonate="no"
Return="check" />
<InstallExecuteSequence>
<Custom Action="SetProperty" Before="InstallInitialize">Not Installed</Custom>
<Custom Action="CA_myCustomAction" Before="InstallFinalize">Not Installed</Custom>
</InstallExecuteSequence>
<!--<InstallUISequence>
<Custom Action="CA_myCustomAction" After="CostFinalize"></Custom>
</InstallUISequence>-->
</Module>
</Wix>
을, 나는 시도 - INSTALLLOCATION 여기서 installdir, TARGETDIR하지만 ProgramFiles (x86)에있는 응용 프로그램에 지정된 설치 폴더를 가져올 수 없습니다.
SourceDir
의 값은 실행되는 동안 MSI 파일이있는 적절한 값으로 나옵니다.
감사합니다. 그것은 당신보다 다른 윅스를 아는 사람이 stackoverflow에없는 것 같습니다. MergeRedirectFolder 또는 SuppressModularization을 사용하기 위해 인터넷에 예제 또는 포인터를 제공해 주시겠습니까? – teenup
MergeRedirectFolder를 사용하여 예제를 업데이트했습니다. 여기서 보여줄 수없는 부분은 InstallShield에 병합 모듈을 추가 할 때 마우스 오른쪽 버튼을 클릭하고 드롭 다운 목록을 사용하여 병합 모듈을 INSTALLDIR과 연결해야한다는 것입니다. –
고마워, 나는 이것을 월요일에 시도 할 것이다. 고마워. – teenup