[wix-users] Adding ticks to Total Progress

Bob Arnson bob at firegiant.com
Wed Aug 17 16:24:41 PDT 2016


https://github.com/wixtoolset/wix3/blob/develop/src/libs/wcautil/wcawrap.cpp 

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Russ Cam
Sent: Monday, 15 August, 2016 23:12
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Adding ticks to Total Progress

Hi,

MSDN has a documentation page for how to add ticks to total progress using an immediate executed custom action, and then to increment the progress bar (as well as provide action data messages) in a deferred custom action:

https://msdn.microsoft.com/en-us/library/windows/desktop/aa367525(v=vs.85).aspx

I've ported this to a managed custom action and am using in conjunction with the InstallProgressCounter from the Wix samples:

https://github.com/wixtoolset/wix3/blob/a83b2130299ef95c9b0ec5c6d80bf34cc4722dfb/src/DTF/Samples/EmbeddedUI/InstallProgressCounter.cs

There is a problem however. It seems a progress reset record is received before executing each deferred custom action (this is not explicitly sent by me, so must be part of the MSI runtime/process). This record is handled by the InstallProgressCounter, but it comes through with a value of 0 in field 2, which sets the total in the counter back to 0

https://github.com/wixtoolset/wix3/blob/a83b2130299ef95c9b0ec5c6d80bf34cc4722dfb/src/DTF/Samples/EmbeddedUI/InstallProgressCounter.cs#L97

hence, any calculations of Progress will return 0, but this is counteracted in InstallProgressCounter by the progressPhase being incremented above 2, such that Progress is always returned as 1

https://github.com/wixtoolset/wix3/blob/a83b2130299ef95c9b0ec5c6d80bf34cc4722dfb/src/DTF/Samples/EmbeddedUI/InstallProgressCounter.cs#L170-L173


I currently have something working whereby an explicit Progress reset record is sent prior to sending a Progress record to indicate using explicit progress records, and have modified the UpdateProgress method to calculate Progress in the same way in which it is calculated when the progressPhase is 2.

I have two questions:

1. Is it possible to simply have one incrementing progress bar (from 0 to
1.0) for all progress within the installer i.e. not reset the progress bar for every custom action? Or am I misunderstanding how MSIs work? Is the MSDN example misleading?

2. If (1) is possible, are there any examples (in any language) of how this is handled?

3. Is there some resource (online/book/free/paid) where I can understand more about the flow of MSI records during installation?

Thanks

Russ

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list