1

I am trying to execute several installers using [Run]. My problem is, since each entry might take up to 1-2 minute(s), my installer window becomes frozen. I can't Cancel, I can't Re-size, and most disturbingly, I can't Move the window.

Here's the method I use:

[Run]    
Filename: "{tmp}\DesktopLinkSetup.exe";
StatusMsg: "Installing Desktop Link. Please wait, this can take up to 1 min";
Flags: runhidden;
Parameters: "/VERYSILENT";

Filename: "{tmp}\NotificationLinkSetup.exe";
StatusMsg: "Installing Notification Link. Please wait, this can take up to 2 min";
Flags: runhidden;
Parameters: "/VERYSILENT";

I know [Run] might have blocked my UI thread, but is there any way to make window react to user mouse control? like Move Window?

thanks

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Leo Chen
  • 969
  • 1
  • 11
  • 25
  • Nope, as long as you'd run those applications from a worker thread. – TLama Apr 20 '15 at 15:02
  • Then that requires writing DLL right? – Leo Chen Apr 20 '15 at 15:08
  • Cannot say requires (as I don't know if the required WinAPI functions could be translated into the pure Inno Setup Pascal Script), but a lot easier is to wrap it into a DLL (just do not think about C# ;-) – TLama Apr 20 '15 at 15:28
  • I don't have my environment with me, but I guess if I use nowait as its Flag, it won't block UI anymore. But then it will cause another problem. My wizard might finish before all run entry finish. – Leo Chen Apr 20 '15 at 15:53
  • But there's no way out of this. Even if you'd make a function that would be [`waiting for the application to finish`](http://stackoverflow.com/a/10910780/960757) in a loop, you won't pump up the main thread message loop (Delphi has `Application.ProcessMessages` method for that, but it's not published by Inno Setup), which is necessary to keep the UI *alive*. – TLama Apr 20 '15 at 15:57
  • I've seen someone [simulating progress bar](http://stackoverflow.com/questions/6921254/innosetup-simple-progress-wizard) by setting each Run entry to noWait, and using "for loop" with progress update code and Sleep() inside it in [Code] section to simulate progress bar update. I've tried this method and this provides the best user experience. But I really think this is a dirty solution. Is this method typically used? or is the method I proposed above used more often? – Leo Chen Apr 21 '15 at 02:40

0 Answers0