Sign in to follow this  
Followers 0
MikaBrel

Progress Bar during installation

3 posts in this topic

#1 ·  Posted (edited)

Hi guys,

I'm a newbie, and I have a little question.

I have a autoit script to install FlashPlayer when user is not admin.

This script : 

$strAdminNom = "username"
$strAdminPasswd = "password"
$strDomain = "mydomain"
$path = "\\mypath\Software\Flash_Player"

If Not IsAdmin() Then

    RunAsWait($strAdminNom, $strDomain, $strAdminPasswd, 0, 'msiexec /i "' & $path & '\install_flash_player_15_active_x.msi" /qn Reboot=ReallySuppress', @WindowsDir)

EndIf

Exit

My script launch Flash Install with silent mode (without interface of flash).

I need to add a progress bar for users.

Install take 10 secondes. I have modify the script like that : 

$strAdminNom = "username"
$strAdminPasswd = "password"
$strDomain = "mydomain"
$strCommande = "Install_Flash15.exe"
$path = "\\mypath\Software\Flash_Player"

ProgressOn("Install Flash Player 15", "Please Wait...", "0 %")
For $i = 10 to 100 step 10
    sleep(2000)
    ProgressSet( $i, $i & " %")
Next
ProgressSet(100, "", "End")
sleep(500)
ProgressOff()
MsgBox(64, "Flash Player 15", "Install ok")


If Not IsAdmin() Then

    ; on exécute à nouveau le script en tant qu'administrateur

    RunAsWait($strAdminNom, "gce.com", $strAdminPasswd, 0, 'msiexec /i "' & $path & '\install_flash_player_15_active_x.msi" /qn Reboot=ReallySuppress', @WindowsDir)

;Else
 ;   RunWait('msiexec /i "' & $path & '\install_flash_player_15_active_x.msi" /qn Reboot=ReallySuppress', @WindowsDir)
EndIf

Exit

The problem is that the script execute in first the progress bar, and after the flash install.

How launch progressbar during install of flash ?

Many thanks (and sorry for my bad english)

Edited by MikaBrel

Share this post


Link to post
Share on other sites



$strAdminNom = "username"
$strAdminPasswd = "password"
$strDomain = "mydomain"
$strCommande = "Install_Flash15.exe"
$path = "\\mypath\Software\Flash_Player"

ProgressOn("Install Flash Player 15", "Please Wait...", "0 %")



If Not IsAdmin() Then

    ; on exécute à nouveau le script en tant qu'administrateur

    RunAs($strAdminNom, "gce.com", $strAdminPasswd, 0, 'msiexec /i "' & $path & '\install_flash_player_15_active_x.msi" /qn Reboot=ReallySuppress', @WindowsDir)

;Else
 ;   Run('msiexec /i "' & $path & '\install_flash_player_15_active_x.msi" /qn Reboot=ReallySuppress', @WindowsDir)
EndIf
For $i = 10 to 100 step 10
    sleep(2000)
    ProgressSet( $i, $i & " %")
Next
ProgressSet(100, "", "End")
sleep(500)
ProgressOff()
MsgBox(64, "Flash Player 15", "Install ok")
Exit

Share this post


Link to post
Share on other sites

Many thanks ! it works fine.

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