In order to show progress, you have to know two things: total work to be
done and current amount of work completed. MsiProcessMessage is used to
notify Windows Installer how much work has been completed.
Who knows how much work has been done? If it is the EXE that you cannot
modify, then I don't know how you could use a realistic progress bar.

You could fake the progress bar by creating a custom action that spawns two
background threads. One thread is the EXE that needs to run and the other is
a timer. When the timer updates you could increment the progress bar through
MsiProcessMessage.

To do this trickery, you'd have to estimate how long the EXE should take to
run. If a computer is faster, then your task will finish before the progress
bar is filled up. If the computer is slower, then your progress bar will get
"stuck" at 100% completed.

I have a lengthy executable that runs at the end of an installer. My
ProgessText for the custom action includes the text "This may take several
minutes. Please be patient." The users don't get a progress bar, but their
expectations are set.

- Don Benson -

On Wed, Mar 18, 2009 at 1:57 AM, Michael <mich...@gnhsoft.com> wrote:

> Hi Richard,
>
>  Thanks for your suggestion. How do I use it? I can't modify EXE. Where
> I have to write MsiProcessMessage?
>
> Regards,
> -SMR
>
> Richard wrote:
> > In article <5a8c7ab90903170713j46a90ffeiae458e6fa1b1a...@mail.gmail.com
> >,
> >     Don Benson <dbenso...@gmail.com>  writes:
> >
> >
> >> The Windows Installer documentation seems to indicate that the progress
> bar
> >> does not work after InstallFinalize. Check out the following, link,
> >> especially step 9.
> >>
> >> http://msdn.microsoft.com/en-us/library/aa367525(VS.85).aspx
> >>
> >
> > I think that's only because that example is talking about a deferred
> > CA which must be in the install transaction.
> >
> > To change the progress bar, you need to call MsiProcessMessage with
> > INSTALLMESSAGE_PROGRESS.  See
> > <http://msdn.microsoft.com/en-us/library/aa370354(VS.85).aspx>
> >
> > ------------------------------------------------------------------------
> >
> >
> > No virus found in this incoming message.
> > Checked by AVG - www.avg.com
> > Version: 8.0.237 / Virus Database: 270.11.17/2007 - Release Date:
> 03/17/09 10:18:00
> >
> >
>
>
>
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to