2010-08-16 6 views

답변

21

예입니다. [code] 섹션에서 파일을 InitializeSetup() 함수로 실행하십시오. 이 예는 설정을 실행하기 전에 메모장을 시작합니다.

function InitializeSetup(): boolean; 
var 
    ResultCode: integer; 
begin 

    // Launch Notepad and wait for it to terminate 
    if Exec(ExpandConstant('{win}\notepad.exe'), '', '', SW_SHOW, 
    ewWaitUntilTerminated, ResultCode) then 
    begin 
    // handle success if necessary; ResultCode contains the exit code 
    end 
    else begin 
    // handle failure if necessary; ResultCode contains the error code 
    end; 

    // Proceed Setup 
    Result := True; 

end; 
+0

이것은 내가 필요한 것입니다. 감사. –

+13

사용자 컴퓨터에서 아무 것도 변경하지 않으면 InitializeSetup에서이 작업을 수행하면 안됩니다. 이 작업은 사용자가 "설치"(PrepareToInstall() 또는 CurStepChanged (ssInstall))를 누른 후에 수행해야합니다. – Deanna

관련 문제