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
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- Update progress bar during uninstall
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
‎Aug 17, 2011
02:30 PM
Update progress bar during uninstall
Hi,
My team is running a rather long custom uninstall action and would like the progress bar to update as the action executes. We're handling the progress bar the same way we handled it during the install, spawning a process which updates the bar via the ProgressAccess interface that UninstallerProxy implements.
However, when the custom action executes, the status text disappears and the progress stays stuck until the action completes.
We're also trying to update the status text several times for the same custom code action.
The runnable that updates the progress bar resembles the following:
And then we use the runnable like this:
Any help/tips would be much appreciated.
We are using IA 2010 Enterprise SP1 (IBM HotFix F).
Regards,
Bennett
My team is running a rather long custom uninstall action and would like the progress bar to update as the action executes. We're handling the progress bar the same way we handled it during the install, spawning a process which updates the bar via the ProgressAccess interface that UninstallerProxy implements.
However, when the custom action executes, the status text disappears and the progress stays stuck until the action completes.
We're also trying to update the status text several times for the same custom code action.
The runnable that updates the progress bar resembles the following:
public ProgressUpdater(ProgressAccess progressAccess, long estimatedTime) {
this.progressAccess = progressAccess;
this.estimatedTime = estimatedTime;
}
public void run() {
int percentage = 0;
long sleepTime = Math.round(estimatedTime * BUFFER);
while (!actionCompleted && percentage < MAX_IN_PROGRESS_PERCENTAGE) {
progressAccess.setProgressPercentage(percentage++);
try {
Thread.sleep(sleepTime);
} catch (InterruptedException e) {
// No operation needed, just stop the thread
}
}
}
public void setActionCompleted() {
actionCompleted = true;
}
public void updateStatusText(String message) {
progressAccess.setProgressStatusText(message);
}
And then we use the runnable like this:
// Fork a new thread to update progress bar
ProgressUpdater progressBar = new ProgressUpdater(proxy, estimatedUninstallTime);
new Thread(progressBar).start();
try {
progressBar.updateStatusText("Running part A...");
// ... run part A
progressBar.updateStatusText("Running part B...");
// ... run part B
} finally {
progressBar.setActionCompleted();
}
Any help/tips would be much appreciated.
We are using IA 2010 Enterprise SP1 (IBM HotFix F).
Regards,
Bennett
(7) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 19, 2011
03:28 PM
pbcole, did you ever get this solved?
We have a Basic MSI project that has a custom action that gets triggered and runs for about 5 minutes, but the progress bar remains at 94% and hangs there until the custom action is done. So we would like to see if we can reset the progress bar and have it slowly increment until the custom action is complete.
So is there a go way to handle this or get it to work?
Thanks,
We have a Basic MSI project that has a custom action that gets triggered and runs for about 5 minutes, but the progress bar remains at 94% and hangs there until the custom action is done. So we would like to see if we can reset the progress bar and have it slowly increment until the custom action is complete.
So is there a go way to handle this or get it to work?
Thanks,
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 19, 2011
03:48 PM
Hi Tim,
I've had no luck so far. I upgraded to IA 2011 yesterday to see if it solved our issue, but it's had no impact so far.
Still unable to get any status text to render either.
I am, however, using Java. For your MSI you're using .Net, no?
Regards,
Bennett
I've had no luck so far. I upgraded to IA 2011 yesterday to see if it solved our issue, but it's had no impact so far.
Still unable to get any status text to render either.
I am, however, using Java. For your MSI you're using .Net, no?
Regards,
Bennett
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 19, 2011
03:53 PM
Thanks for the info..
The custom actions are simple C++ msi dlls. So I have been looking around and in the help under "Adding Custom Actions to the ProgressBar" there is a big discription on how to add ticks/text to the progress bar, but just have to read and reread it to understand it. There is a small sample there, but it is only half of what is required. So I'll just have to read more into it.
Thanks,
The custom actions are simple C++ msi dlls. So I have been looking around and in the help under "Adding Custom Actions to the ProgressBar" there is a big discription on how to add ticks/text to the progress bar, but just have to read and reread it to understand it. There is a small sample there, but it is only half of what is required. So I'll just have to read more into it.
Thanks,
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 23, 2011
10:17 AM
I have the same requirement using IA2010 SP1...Where can I find documentation about using the ProgressUpdater class?
Thanks
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 30, 2011
12:04 PM
pbcole wrote:
Hi,
And then we use the runnable like this:// Fork a new thread to update progress bar
ProgressUpdater progressBar = new ProgressUpdater(proxy, estimatedUninstallTime);
new Thread(progressBar).start();
try {
progressBar.updateStatusText("Running part A...");
// ... run part A
progressBar.updateStatusText("Running part B...");
// ... run part B
} finally {
progressBar.setActionCompleted();
}
Is the part above, in the
public void uninstall(UninstallerProxy up) throws InstallException
method of your CustomCode class?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 06, 2011
10:49 AM
Can you please elaborate more about making customized progress bars? I'm a little bit confuse about this one.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 08, 2012
07:30 AM
I have no success with above code with InstallAnywhere 2010.
Any updates with this ?
Any updates with this ?