동일한 실행 파일을 사용하여 여러 Windows 서비스를 설치하려고하지만 WiX는 두 파일 태그의 동일한 이름 속성을 좋아하지 않습니다. 두 파일 태그의 이름을 변경하려고했습니다. 그것은 작동하지만 두 개의 동일한 실행 파일을 설치하지 않아도된다고 생각합니다. 이 작업을 수행하는 더 좋은 방법이 있습니까?Wix - 하나의 실행 파일로 여러 Windows 서비스를 설치하는 방법?
<Component Id="Service1" Guid="{SOMEGUID1}">
<File Id='Service1' Name='ConnDriver.exe' DiskId='1' Source='..\Service\obj\x86\$(var.BUILD)\ConnDriver.exe' KeyPath='yes'/>
<ServiceInstall
Id="ServiceInstaller1"
Type="ownProcess"
Name="MyService1"
DisplayName="MyService1"
Description="Some Description"
Start="auto"
Account="[SERVICEACCOUNT]"
Password="[SERVICEPASSWORD]"
ErrorControl="normal"
Arguments=' "Service1"'
Vital="yes"
Interactive="no" />
<ServiceControl Id="ServiceControl1" Stop="uninstall" Remove="uninstall" Name="MyService1" Wait="yes" />
</Component>
<Component Id="Service2" Guid="{SOMEGUID2}">
<File Id='Service2' Name='ConnDriver.exe' DiskId='1' Source='..\Service\obj\x86\$(var.BUILD)\ConnDriver.exe' KeyPath='yes'/>
<ServiceInstall
Id="ServiceInstaller2"
Type="ownProcess"
Name="MyService2"
DisplayName="MyService2"
Description="Some Description"
Start="auto"
Account="[SERVICEACCOUNT]"
Password="[SERVICEPASSWORD]"
ErrorControl="normal"
Arguments=' "Service2"'
Vital="yes"
Interactive="no" />
<ServiceControl Id="ServiceControl2" Stop="uninstall" Remove="uninstall" Name="MyService2" Wait="yes" />
</Component>
기능에서 : 어떤 도움에 감사드립니다
<Feature Id="Feature1" Title="Feature 2" Level="1" Description="...">
<ComponentRef Id="Service1_xml"/>
<ComponentRef Id="Service1"/>
</Feature>
<Feature Id="Feature2" Title="Feature 2" Level="1" Description="...">
<ComponentRef Id="Service2_xml"/>
<ComponentRef Id="Service2"/>
</Feature>
여기에 지금까지 내 코드입니다.
(추신 : 내가 2 개 구성 요소로 구성한 이유는 기능 섹션에 xml 구성 파일을 포함시킬 수 있기 때문입니다. 내 Windows 서비스 설치 관리자는 명령 줄 인수를 사용하여 읽고) 따라 구성
편집 :
오류 출력 : ICE30
: 대상 파일 'hlo8twix.exe | ConnDriver.exe가' '[ProgramFilesFolder] \ 회사 명 \ programName을 \'에 설치 LFN 시스템의 두 가지 구성 요소 인 'Service1'과 'Service2'로 구성됩니다. 이렇게하면 구성 요소 참조 카운팅이 중단됩니다.
당신은 윅스 출력을 포함 할 수 있을까요? –
이 모양은 Windows의 특성상 사용자 지정 작업을 통해서만 수행 할 수 있습니다. http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Using-the-same-exe-file -for-different-services-in-one-MSI-td6520212.html – Jazon
사용자 지정 작업을 사용하여 가능하다는 것을 확인할 수 있습니다. –