2013-08-29 1 views
0

wix를 사용하여 설치 프로그램을 만들고 있는데 StartServices 액션에서 멈추고 있습니다. 10 분 "조기 종료"에 대한 설치 뭔가 -WiX v3.7 - "Starting Services"에서 멈추는 설치자

내가 5 기다리면
Action 17:15:08: StartServices. Starting services 
Action start 17:15:08: StartServices. 
StartServices: Service: Starting services 
Action ended 17:15:08: StartServices. Return value 1. 

: 여기

<Component Id="CMP_RemindexNP.exe" Guid="{3FB99890-752D-4652-9412-72230695A520}"> 
    <File Id="FILE_INSTALLFOLDER_RemindexNPEXE" Source="RemindexNP.exe" KeyPath="yes"/> 
    <RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\RemindexNP\Parameters"> 
     <RegistryValue Id="rg_remNP1" Action="write" Name="AppDirectory" Value="[INSTALLFOLDER]" Type="string"/> 
     <RegistryValue Id="rg_remNP2" Action="write" Name="Application" Value="[INSTALLFOLDER]RemindexNP.exe" Type="string"/> 
    </RegistryKey> 
    <ServiceInstall DisplayName="RemindexNP" Id="srv_remNP" Name="RemindexNP" Start="auto" Type="shareProcess" ErrorControl="ignore"/> 
    <ServiceControl Id="srvc_remNP" Name="RemindexNP" Remove="both" Start="install" Stop="uninstall" Wait="no"/> 
</Component> 

로그 파일의 StartService 조치는 다음과 같습니다 여기에 내가 설치하고있어 유일한 서비스입니다 . 또는 작업 관리자에서 작업을 중지 할 수 있으며 몇 분 후에 같은 대화 상자가 나타납니다.

ServiceInstall의 Type 속성을 shareProcess 및 ownProcess로 설정해 보았습니다. 둘 중 어느 것도 작동하지 않습니다. 나는 또한 '아니오'와 '예'로 설정을 시도했다.

ServiceInstall 요소에 문제가 있습니까?

의견을 보내 주시면 대단히 감사하겠습니다.

+0

가능한 복제본 [WiX v3.7 - 사용자 지정 작업에서 배치 파일의 동작 복제] (http://stackoverflow.com/questions/18495579/wix-v3-7-replicate-behavior-of-a- 배치 파일 내 맞춤 작업) –

+0

이전 질문을 답장 한 부분을 다시 게시했습니다. 이 질문에 srvany.exe에 대한 참조가 누락되어 누군가가 문제를 알 수 없게됩니다. –

답변

0

설치 프로그램에 다음 서비스 구성 요소가 있는데 제대로 작동합니다. 서비스가 올바르게 시작되지 않은 설치 중에 문제가 발생했을 때 서비스에서 일종의 로깅 메커니즘을 갖는 것이 매우 유용했습니다. 일부 잘못된 구성으로 인해 서비스를 시작하지 못했기 때문에 설치를 완료 할 수 없습니다. 분석 할 수 없었고 문제를 해결할 수 없었습니다. 설치 프로그램에서 생성하여 해당 서비스에서 사용하는 이벤트 로그를 볼 수 없었습니다. 구문 론적으로 ServiceInstall 및 ServiceControl 요소가 올바르게 보이기 때문에 같은 경로로 이동하는 것이 좋습니다.

<PropertyRef Id="NETFRAMEWORK20"/> 
<PropertyRef Id="NETFRAMEWORK40FULL"/> 
<Component Id="CMP_ServiceEventLogNetfx2" Guid="YOURGUIDHERE"> 
    <util:EventSource Name="Service" EventMessageFile="{[NETFRAMEWORK20INSTALLROOTDIR]}EventLogMessages.dll" Log="YourLog" KeyPath="yes"/> 
    <Condition> 
     <![CDATA[(Installed OR NETFRAMEWORK20) AND VersionNT < 600]]> 
    </Condition> 
</Component> 
<Component Id="CMP_ServiceEventLogNetfx4" Guid="YOURGUIDHERE"> 
    <util:EventSource Name="Service" EventMessageFile="{[NETFRAMEWORK20INSTALLROOTDIR]}EventLogMessages.dll" Log="YourLog" KeyPath="yes"/> 
    <Condition> 
     <![CDATA[(Installed OR NETFRAMEWORK40FULL) AND VersionNT >= 600]]> 
    </Condition> 
</Component> 

을 그리고 물론 당신은 당신의 서비스에 그 이벤트 로그를 사용할 수 있습니다

<Component Id="CMP_SERVICE" Guid="YOURGUIDHERE"> 
<File Source="Files/Service.exe" Id="Service.exe" KeyPath="yes" Compressed="no" /> 
<ServiceInstall 
    Id="SvcInstallService" 
    Name="Service" 
    DisplayName="Service" 
    Type="ownProcess" 
    Description="Service Desc" 
    Start="auto" 
    ErrorControl="normal"> 
    <util:ServiceConfig 
    ServiceName="Service" 
    FirstFailureActionType="restart" 
    SecondFailureActionType="restart" 
    ResetPeriodInDays="1" 
    RestartServiceDelayInSeconds="5" 
    ThirdFailureActionType="restart"/> 
</ServiceInstall> 
<ServiceControl 
    Id="sc_Service" 
    Name="Service" 
    Start="install" 
    Stop="both" 
    Remove="uninstall" 
    Wait="no" /> 
</Component> 

는 Eventlogsource는 다음과 같은 코드를 사용하여 만듭니다. 그 목적으로 WriteEntry 메서드와 함께 System.Diagnostics.EventLog 클래스를 사용하십시오.

마지막 단계는 설치 중에 eventviewer (eventvwr.msc)를 열고 서비스 로그를 살펴 보는 것입니다.