2014-02-07 2 views
5

상승 된 권한이 필요한 사용자 지정 동작이 있습니다. 이 사용자 지정 작업의 목적은 sc.exe를 실행하고 Windows와 함께 제공되는 서비스 (w32time)에 대한 서비스 트리거를 제거하는 것입니다. 여기 지연된 실행의 예를 따라잘못된 명령 줄 오류로 CAQuietExec을 사용하는 WiX 사용자 지정 동작이 실패합니다.

<Property 
    Id="removeW32TimeTrigger" 
    Value="&quot;[SystemFolder]sc.exe&quot; triggerinfo w32time delete" 
/> 

<CustomAction 
    Id="removeW32TimeTrigger" 
    BinaryKey="WixCA" 
    DllEntry="CAQuietExec" 
    Execute="deferred" 
    Return="ignore" 
    Impersonate="no" 
/> 

<InstallExecuteSequence> 
    <Custom Action="removeW32TimeTrigger" After="InstallInitialize" /> 
</InstallExecuteSequence> 

: 여기

는 의미의 조각입니다 http://wixtoolset.org/documentation/manual/v3/customactions/qtexec.html

로그에서 오류가 찾을 수있는 위치에 대한 내 구문에 문제가있는 것으로 보인다

sc.exe.

Action 11:36:48: removeW32TimeTrigger. 
CAQuietExec: Command string must begin with quoted application name. 
CAQuietExec: Error 0x80070057: invalid command line property value 
CAQuietExec: Error 0x80070057: failed to get Command Line 

내가 뭔가 잘못하고 명확하게입니다. 어떤 도움을 주시면 감사하겠습니다.

+0

좋아 ... 지연된 CA에 즉시에서이 이동하는 동안 그래서 내가 [SystemFolder] 확장하지 않을 것을 기억 무시. 나는 또한 망쳐 놨고 문제에 대한 부실 오류 로그를 게시했습니다. 위의 코드 조각과 일치하는 오류 로그는 다음과 같이 실패합니다. CAQuietExec : 오류 0x80070002 : 명령 실행이 실패했습니다. – skiloup

답변

8

CA를 지연 실행 중이므로 Property 대신 CustomActionData를 51 사용자 지정 동작으로 보내야합니다.

이 시도하고 그것이 작동하는지 확인 :

<CustomAction Id='removeW32TimeTrigger_set' 
       Property='removeW32TimeTrigger' 
       Value='"[SystemFolder]sc.exe" triggerinfo w32time delete' 
       Execute='immediate'/> 

<CustomAction 
    Id="removeW32TimeTrigger" 
    BinaryKey="WixCA" 
    DllEntry="CAQuietExec" 
    Execute="deferred" 
    Return="ignore" 
    Impersonate="no" 
/> 

<InstallExecuteSequence> 
    <Custom Action="removeW32TimeTrigger_set" After="CostFinalize" /> 
    <Custom Action="removeW32TimeTrigger" After="InstallInitialize" /> 
</InstallExecuteSequence> 
+0

공식 문서가 최신이 아닌 것 같으므로 언제 사용할 것인지 자세히 알 수 있습니까? –

관련 문제