Sign in to follow this  
Followers 0
Doppio

Install Windows Patch with ProgressBar

2 posts in this topic

#1 ·  Posted (edited)

I have the following script which I found on this forum, and would like to use it to show the progress while installing a KB (Windows Patch)

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <GDIpProgress.au3>
$Form1 = GUICreate("Form1", 492, 80, 193, 125)
GUICtrlCreatePic(@ScriptDir & "\background.bmp", 0, 40, 492, 40, $WS_CLIPSIBLINGS)
$Button1 = GUICtrlCreateButton("Start", 208, 8, 75, 25, 0)
$Progress1 = _ProgressCreate(55, 60, 386, 14)
_ProgressSetText($Progress1, "")
_ProgressSetImages($Progress1, @ScriptDir & "\progress1.bmp", @ScriptDir & "\progress2.bmp")
_ProgressSet($Progress1, 0)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
        For $i = 1 to 100 Step 1
            sleep(100)
        _ProgressSet($Progress1, $i)
        Next
    EndSwitch
WEnd

Can someone point me in the right direction?

Thanks guys.

Edited by Doppio

Share this post


Link to post
Share on other sites



I have the following script which I found on this forum, and would like to use it to show the progress while installing a KB (Windows Patch)

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <GDIpProgress.au3>
$Form1 = GUICreate("Form1", 492, 80, 193, 125)
GUICtrlCreatePic(@ScriptDir & "\background.bmp", 0, 40, 492, 40, $WS_CLIPSIBLINGS)
$Button1 = GUICtrlCreateButton("Start", 208, 8, 75, 25, 0)
$Progress1 = _ProgressCreate(55, 60, 386, 14)
_ProgressSetText($Progress1, "")
_ProgressSetImages($Progress1, @ScriptDir & "\progress1.bmp", @ScriptDir & "\progress2.bmp")
_ProgressSet($Progress1, 0)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
        For $i = 1 to 100 Step 1
            sleep(100)
        _ProgressSet($Progress1, $i)
        Next
    EndSwitch
WEnd

Can someone point me in the right direction?

Thanks guys.

The KB I'm Using is Windows6.0-KB952627-x64.MSU

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