2010-08-16 32 views

Trả lời

21

Vâng. Trong phần [code] chạy tệp trong hàm InitializeSetup(). Ví dụ này khởi chạy notepad trước khi thiết lập chạy.

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

Đây là những gì tôi cần! Cảm ơn. –

+13

Điều này không nên được thực hiện trong InitializeSetup nếu nó thay đổi bất cứ điều gì trên máy tính người dùng. Điều này nên được thực hiện sau khi người dùng đã nhấn "Cài đặt", tức là PrepareToInstall() hoặc CurStepChanged (ssInstall). – Deanna

Các vấn đề liên quan