This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Include Custom Action in Progress Bar
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Feb 02, 2009
04:30 AM
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:
..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
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
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Feb 03, 2009
03:19 AM
Anyone? Please?
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)