2010-08-16 12 views

Odpowiedz

21

Tak jest. W sekcji [code] uruchom plik w funkcji InitializeSetup(). Ten przykład uruchamia notatnik przed uruchomieniem instalacji.

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

Tego właśnie potrzebowałem! Dzięki. –

+13

Nie należy tego robić w InitializeSetup, jeśli zmienia coś na komputerze użytkownika. Powinno to nastąpić po naciśnięciu przez użytkownika "Install", tj. PrepareToInstall() lub CurStepChanged (ssInstall). – Deanna