Jump to content

Progress Bar doesn't recognize the installation procedure


Go to solution Solved by Maggus,

Recommended Posts

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

Link to comment
Share on other sites

  • Solution

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 ( )
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...