Sign in to follow this  
Followers 0
goodbyeplanet

simple progressbar during installation

6 posts in this topic

#1 ·  Posted (edited)

I need a progress bar to show during installation of my applications. from the help file this is what i managed to come up with. Thank you for your help

while 1 
ProgressOn("Progress Bar", "Sample progress bar", "Working...")

For $i = 0 To 100
    ProgressSet($i)
    Sleep(5)
Next

ProgressSet(100, "Done!")
Sleep(750)
ProgressOff()

runwait("applications\" & $dir & "\autosetup.au3","applications\" & $dir)   wend
Edited by goodbyeplanet

Share this post


Link to post
Share on other sites



Your progress bar is done before you even kick off the run.

Share this post


Link to post
Share on other sites

Your progress bar is done before you even kick off the run.

ja sure i have also tried below but i am kinda confused where i should position my runwait statement. sorry i am still learning autoit
while 1 
ProgressOn("Progress Bar", "Sample progress bar", "Working...")

For $i = 0 To 100
runwait("applications\" & $dir & "\autosetup.au3","applications\" & $dir)
    ProgressSet($i)
    Sleep(5)
Next

ProgressSet(100, "Done!")
Sleep(750)
ProgressOff()

   wend

Share this post


Link to post
Share on other sites

you have several solutions for follow progress install

by output give by installer, time if you know it or directory size...

like that Posted Image

#include <Math.au3>

; simulation of the freeware FairStars CD Ripper Installation ( http://www.fairstars.com/download/fscdripper_setup.exe )
; dirgetsize of @ProgramFilesDir & '\FairStars CD Ripper' give 6331609 bits after install.

$_Pid = Run ( @DesktopDir & '\fscdripper_setup.exe /VERYSILENT /SP-' ) 
ProgressOn ( "Progress Bar", "Install of FairStars CD Ripper", "Working..." )
While ProcessExists ( $_Pid )
    $_DirSize = DirGetSize ( @ProgramFilesDir & '\FairStars CD Ripper' )
    If $_DirSize Then
        $_Percent = $_DirSize*100/6331609
        $_Percent = _Max ( _Min ( $_Percent, 99 ), 1 )
        ProgressSet ( $_Percent )
    EndIf
    Sleep ( 100 )
WEnd

ProgressSet ( 100, "Done !" )
Sleep ( 2000 )
ProgressOff ( )

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Thanks wakillon, while i didnt get a solution yet because of my many applications at least I have an idea of how it can be done after reviewing your example..thanks again for your help

Share this post


Link to post
Share on other sites

Glad to help you !

The most incovenient of this method is to do a first install for get directory size ! Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0