[运行] 部分是否在触发 ssPostInstall 步骤的 CurStepChanged 事件之前处理?
Is the [Run] section processed before the CurStepChanged event for the ssPostInstall step is fired?
在我的代码中,我使用 [Run]
部分以及 CurStepChanged
事件处理程序在 ssPostInstall
发生时做一些事情。在伪脚本中是这样的:
[Run]
Filename: "{app}\FileToRun.exe"; Parameters: "/x"
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
begin
// do some stuff
end;
end;
我的问题是,先处理哪个。 [Run]
部分是否在触发 ssPostInstall
步骤的 CurStepChanged
事件之前处理?
据我观察,[Run]
部分似乎首先处理。
没错。 [Run]
section entries are processed before the CurStepChanged
event for the ssPostInstall
step is fired. It can be read in the following piece of code
(评论是我的):
ProcessRunEntries; // <- this processes the [Run] section entries
if RmDoRestart and
(InitRestartApplications or
((shRestartApplications in SetupHeader.Options) and not InitNoRestartApplications)) then
RestartApplications;
SetStep(ssPostInstall, True); // <- and this triggers the CurStepChanged event
在我的代码中,我使用 [Run]
部分以及 CurStepChanged
事件处理程序在 ssPostInstall
发生时做一些事情。在伪脚本中是这样的:
[Run]
Filename: "{app}\FileToRun.exe"; Parameters: "/x"
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
begin
// do some stuff
end;
end;
我的问题是,先处理哪个。 [Run]
部分是否在触发 ssPostInstall
步骤的 CurStepChanged
事件之前处理?
据我观察,[Run]
部分似乎首先处理。
没错。 [Run]
section entries are processed before the CurStepChanged
event for the ssPostInstall
step is fired. It can be read in the following piece of code
(评论是我的):
ProcessRunEntries; // <- this processes the [Run] section entries
if RmDoRestart and
(InitRestartApplications or
((shRestartApplications in SetupHeader.Options) and not InitNoRestartApplications)) then
RestartApplications;
SetStep(ssPostInstall, True); // <- and this triggers the CurStepChanged event