I'm preparing an inno setup to install a windows forms application and an office add-in both at the same time. I deploy all my windows forms files (exe and dll) and the office add-in deployment files during installation and all works fine. But at the end, I got the "installation finished" screen while the office addin "setup.exe" is still running. I don't care about seeing the other installed running or popup in the background, but I don't like the inno setup says "finished" while the other application is running.
This is my code:
[Run]
Filename: "{app}\AddIn\Deploy\setup.exe"; Flags: waituntilterminated runminimized
Filename: "{app}\MyApp.exe"; Description: {cm:LaunchProgram,{cm:MyAppName}}; Flags: nowait postinstall
So, it doesn't obey "runminimized", which I'm fine anyway.... but it doesn't obey "waituntilterminated" either, which I do care.
Note that "AddIn\Deploy\setup.exe" is the file generated by Visual Studio by the "Publish" wizard of the office add-in.
I'd be happy if I only could run this code:
[code]
function PrepareToInstall(var NeedsRestart: Boolean): String;
var
ResultCode : Integer;
begin
if Exec(ExpandConstant('{app}\AddIn\Deploy\setup.exe'), '', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
begin
Result := 'AddIn Installed';
end
else
Result := 'AddIn NOT Installed';
NeedsRestart := false;
end;
But, I would have to running right after the main inno installer copied the files to the "AddIn\Deploy" directory... So, I might just need the right event to override.
CurStepChanged
event when theCurStep
will bessPostInstall
? – TLamawaituntilterminated
flag in[Run]
section works also as expected. You can test both cases simply by executing e.g.notepad.exe
. You will see that the finish page will not be displayed until you close that notepad instance. – TLamathe publish options
for the project, but I cannot find anything what might switch the VS generated installer to some synchronous mode. I'm using VS 2012, but only the Express edition, where this can be limited. – TLama