In my code I'm using the [Run]
section as well as the CurStepChanged
event handler doing some stuff when the ssPostInstall
occurs. In pseudo script something like this:
[Run]
Filename: "{app}\FileToRun.exe"; Parameters: "/x"
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
begin
// do some stuff
end;
end;
My question is, which one is processed as first. Is the [Run]
section processed before the CurStepChanged
event for the ssPostInstall
step is fired?
From what I've observed it seems that the [Run]
section is processed as first.
That is true. The [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
(comments are mine):
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With