2010-08-16 82 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

这就是我需要的!谢谢。 – 2010-08-16 13:42:17

+13

如果它改变用户计算机上的任何内容,则不应在InitializeSetup中完成。这应该在用户按下“安装”后完成,即PrepareToInstall()或CurStepChanged(ssInstall)。 – Deanna 2011-07-25 15:44:13

相关问题