Indigo Rose Software

Go Back   Indigo Rose Software Forums > Old Versions > Setup Factory 5.0

 
 
Thread Tools Display Modes
  #1  
Old 05-10-2000
John Schacher John Schacher is offline
Forum Member
 
Join Date: May 2000
Location: Hillsboro, OR - USA
Posts: 19
Grin Installer not repainting while waiting for external apps

While running my install, it appears as if the installer is unable to repaint/refresh its display panels. It looks like its not responding to Windows messages.

This occurs when using the Execute Program feature under Shell Operations. It is most noticeable when launching a console application and the 'Wait for program to end before continuing' box is checked.

Is this a known isssue, or I'm I using the 'Execute Program' feature incorrectly? Please let me know how if there's something I can do to prevent this behavior.

------------------
John L. Schacher
Dir. Product Development
Sailwest Computing
john@sailwest.net
  #2  
Old 05-10-2000
John Schacher John Schacher is offline
Forum Member
 
Join Date: May 2000
Location: Hillsboro, OR - USA
Posts: 19
Lightbulb Re: Installer not repainting while waiting for external apps

Thanks Ted, and I have a suggestion that may help.

I'm assuming that SUF is using the Win32 API WaitForSingleObject(hApp...) to determine when the program is finished executing. As you know, this function is synchronous and will prevent the current thread from processing any messages until it returns. If this is the case then there are a few ways this can be fixed.

The best way I know in fixing this problem is to use MsgWaitForMultipleObjects() in a loop. When given QS_ALLEVENTS as the wake mask, this function will return when either the external app has terminated or when a message is waiting in the queue. If it's a message, You can then pump the message queue with PeekMessage(PM_REMOVE)... Translate/DispatchMessage() for processing and then loop back to call MsgWaitForMultipleObjects() again.

rocessing the queue is especially important when COM is used within your app (I'm assuming SUF calls CoInitialize()) because the COM subsystem creates a hidden window to be used as the dispatcher for calling methods. This hidden window needs to be able to process the events.

Here's a reference to a Microsoft Developer Network article that contains sample code and a better explanation, Q136885 - "INFO: OLE Threads Must Dispatch Messages".

I've ran into this sort of thing many times in the past and would be happy to provide additional assistance.

Once again, the above solution will only work if my original assumption of the SUF source is correct. If I'm mistaken, then my appologies for taking your time.

[This message has been edited by John Schacher (edited 05-10-2000).]
  #3  
Old 05-11-2000
Ted's Avatar
Ted Ted is offline
Indigo Rose Staff
 
Join Date: Jan 2000
Location: Seattle Area
Posts: 107
Lightbulb Re: Installer not repainting while waiting for external apps

You are correct that the setup.exe is not responding to Windows messages while waiting for your external process to finish. Unfortunately, the API call "blocks" the calling app while waiting for the other process to terminate. The setup runtime can't really do anything about this, so paint messages are not received. Turning off the 'Wait for program to end before continuing' option makes the problem go away.

If anyone has a suggestion as to how this could be avoided, we'd love to hear it!
  #4  
Old 05-11-2000
Ted's Avatar
Ted Ted is offline
Indigo Rose Staff
 
Join Date: Jan 2000
Location: Seattle Area
Posts: 107
Re: Installer not repainting while waiting for external apps

John, I appreciate the suggestions. You are correct in your various assumptions, so I will certainly look into it. I'll post my results here when I'm done. Give me a week or so, as I've got a handfull of other things to get to as well!
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is On



All times are GMT -6. The time now is 07:28 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software