Sign in to follow this  
Followers 0
Maggus

Progress Bar doesn't recognize the installation procedure

7 posts in this topic

Hi all,

I'm really new in this family, so be patient please.

I've did a lot of research in this forum and tried to find the solutions myself...until now :sweating:

I want to run an msi and hide the window. because an silent parametet did'nt not work with this installer.

The installation didn't run with the command "Run", so I did an"ShellExecute".

The installer runs, and the ProgressBar runs and ends before the installation has finished.

Here is my snippet:

$_PID = ShellExecute('msiexec', '/i "IBM SPSS Statistics 21.msi" /qb LICENSETYPE=Network LSHOST=XXX.XXX.de COMPANYNAME=XXX COMMUTE_MAX_LIFE=3 TRANSFORMS=1031.mst /norestart /l* "\\XXX\MACHINE\LOG\SPSS21\' & $Logfile & '.txt" ', $srcdirx86)
    WinWait("Windows Installer")
    WinSetState("Windows Installer","", @SW_HIDE)
    ProgressOn ( "Progress Bar", "Installation von SPSS 21", "Bitte warten..." )
    While ProcessExists ( $_PID )
            $_DirSize = DirGetSize ( $programdirx86 & '\IBM' )
    If $_DirSize Then
        $_Percent = $_DirSize*100/816492021
        $_Percent = _Max ( _Min ( $_Percent, 99 ), 1 )
        ProgressSet ( $_Percent )
    EndIf
    Sleep ( 100 )
WEnd

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

Regards

Maggus

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Thanks for your fast reply.

It's based on the filequota (directory) of an finished Installation, in bytes.

Edited by Maggus

Share this post


Link to post
Share on other sites

Yes, the msi has got an own progress bar, but how could I read it? Which commands did I've to use?

Share this post


Link to post
Share on other sites

Thanks for your help.

I've did it with the "run" command, because it seems that "ShellExecute" doesn't provide an PID.

$_PID = Run('msiexec /i "\\XXX\de\x86\IBM SPSS Statistics 21.msi" /qb LICENSETYPE=Network LSHOST=XXX COMPANYNAME=XXX COMMUTE_MAX_LIFE=3 TRANSFORMS=1031.mst /norestart /l* "\\XXX\LOG\SPSS21\' & $Logfile & '.txt" ', $srcdirx86)
WinWait("Windows Installer")
WinSetState("Windows Installer","", @SW_HIDE)
ProgressOn ( "Installations Assistent", "Installation von SPSS 21. Bitte warten..." )
While ProcessExists ( $_PID )
$_DirSize = DirGetSize ( $programdirx86 & '\IBM' )
If $_DirSize Then
$_Percent = $_DirSize / 816492021 * 100
ProgressSet ( $_Percent, "Prozent: " &Round($_Percent) & "%")
EndIf
Sleep ( 100 )
WEnd

ProgressSet ( 100, "Installation wird Abgeschlossen!" )
Sleep ( 2000 )
ProgressOff ( )

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