cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Boo-snoW
Level 3

Include Custom Action in Progress Bar

I have a custom action (on user interface, after SetupProgress), that takes about 5-10 minutes, but in the meantime the progress bar shows no activity, and it looks like the installer is stuck. I only want the progress bar to show some movement, I don't care about the description. It can only say "Installing" and that's enough, as long as the green lines are moving. 🙂

I read tons of threads on the forum, some seem to have found help here:

http://community.installshield.com/showthread.php?t=105165

..but that does not work for me. Is it any chance it's not working because my custom action is on user interface? Or that has nothing to do with it?

What I did so far is add this script before Install Files in execute sequence with immediate execution:
Const INSTALLMESSAGE_PROGRESS    = &H0A000000 

' ----------
' immediate action that adds a number of "ticks" to the progress bar
'
Function AddTotalTicks( )

Set rec = Installer.CreateRecord(3)

rec.IntegerData(1) = 3
rec.IntegerData(2) = 5000000 ' total ticks to add
rec.IntegerData(3) = 0

Message INSTALLMESSAGE_PROGRESS, rec

Set rec = Nothing

' return success to MSI
AddTotalTicks = 0
End Function


..and this script right right after the previous one, with deferred execution:
[CODE]Const INSTALLMESSAGE_ACTIONSTART = &H08000000
Const INSTALLMESSAGE_ACTIONDATA = &H09000000
Const INSTALLMESSAGE_PROGRESS = &H0A000000

' ----------
' deferred action to increment ticks while action is taking place
'
Function AddProgressInfo( )

Set rec = Installer.CreateRecord(3)

rec.StringData(1) = "callAddProgressInfo"
rec.StringData(2) = "Incrementing the progress bar..."
rec.StringData(3) = "Incrementing tick [1] of [2]"

Message INSTALLMESSAGE_ACTIONSTART, rec

rec.IntegerData(1) = 1
rec.IntegerData(2) = 1
rec.IntegerData(3) = 0

Message INSTALLMESSAGE_PROGRESS, rec

Set progrec = Installer.CreateRecord(3)

progrec.IntegerData(1) = 2
progrec.IntegerData(2) = 5000
progrec.IntegerData(3) = 0

rec.IntegerData(2) = 5000000

For i = 0 To 5000000 Step 5000
rec.IntegerData(1) = i
' action data appears only if a text control subscribes to it
Message INSTALLMESSAGE_ACTIONDATA, rec
Message INSTALLMESSAGE_PROGRESS, progrec
Next ' i

' return success to MSI
AddProgressInfo = 0
End Function
[/CODE]

Is this all that needs to be done? Or I am doing it totally wrong?

Thank you in advance,
Claudiu
Labels (1)
0 Kudos
(1) Reply
Boo-snoW
Level 3

Anyone? Please?
0 Kudos