Sign in to follow this  
Followers 0
nologo73

How to create a status bar

5 posts in this topic

#1 ·  Posted (edited)

Hello guys,

I am new here,

I need help please

Here what I have done:

$var01= "CLICK OK TO START THE UPGRADE"

MsgBox (0, "WINXP SP3 UPGRADE", $var01&@CRLF)

...................

RunWait ("KB898461.exe /Q /O /N /Z")

RunWait ("KB909520.exe /Q /O /N /Z")

RunWait ("KB923561.exe /Q /O /N /Z")

RunWait ("KB923789.exe /Q")

RunWait ("KB926140.exe /Q /O /N /Z")

RunWait ("KB929399.exe /Q /O /N /Z")

....................

................... etc.

....................

$var01= "83 Updates were installed"

$var02= "Installation completed successfully!"

MsgBox (0, "WINDOWSXP SP3 UPDATE", $var01&@CRLF&@CRLF&$var02&@CRLF)

Basically I am trying to create a script to automate the installation process of many windows update.

Some of these update show their own progress bar, and some not. So the user have to wait until the global installation process in done, without understand at which update step the installation is running (update take about 10/15 minutes)

Well, what I'd like to do is, hide the process bar of those windows update that show them self,

and create my own global process bar for all the updates, that show even the number of update running (KBxxxxxx)

I found some topics regarding this issue, but they are not simple for my knowledge

Thanks

Nologo73

Edited by nologo73

Share this post


Link to post
Share on other sites



Here's a simple way that may accomplish what you want...

$sUpdates = "KBKB898461.exe,KB909520.exe,KB923561.exe,KB923789.exe,etc,etc"
$aUpdates = StringSplit($aUpates,",")

ProgressOn("Installing Updates","")

For $i = 1 To $aUpdates[0]
   ProgressSet($i/$aUpdates[0]*100,"","Installing " & $aUpdates[$i])
   RunWait($aUpdates[$i] & " /Q /O /N /Z")
Next

ProgressSet($i/$aUpdates[0]*100,"","Installation complete!")

Sleep(3000)

Exit

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi thrasher,

thank you a million it works perfectly.

Just one another small issue:

Not all update use the same switches /Q /O /N /Z

for example I have even this: /quiet /update-no /norestart

and others few types

Can you give a final tip how to run the upgrades with different switches

thanks

nologo73

Here just a keyboard error:

this $aUpdates = StringSplit($aUpates,",") ------ correct= ($sUpdates,",")

Edited by nologo73

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

$sUpdates = "KBKB898461.exe /Q /O /N /Z,KB909520.exe /Q /O /N /Z,KB923561.exe /Q,KB923789.exe /Q /O /N /Z"
$aUpdates = StringSplit($sUpdates,",")

ProgressOn("Installing Updates","")

For $i = 1 To $aUpdates[0]
   ProgressSet($i/$aUpdates[0]*100,"","Installing " & $aUpdates[$i])
   RunWait($aUpdates[$i])
Next

ProgressSet($i/$aUpdates[0]*100,"","Installation complete!")
Sleep(3000)
Exit

Edited by Zedna

Share this post


Link to post
Share on other sites

Guys,

both of You,

thanks a lot!!!

I really appreciate your help

I am sorry for my awful programming knowledge

this issue was really simple for all of you

Regards,

Nologo73

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