Sign in to follow this  
Followers 0
probedrone

Automate Windows Updates

9 posts in this topic

I'm sure you smart people have done it before :P

So can anyone give me the safest way to run windows updates? I prefere not to go through IE

Share this post


Link to post
Share on other sites



HI,

Start --> Help & support --> update ? :P

Or what do you mean?

So long,

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Well same problem as before I cant really automate the button clicks, say for choosing "express" install

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Well same problem as before I cant really automate the button clicks, say for choosing "express" install

There are a couple of posted on this topic. Best one I've seen and used is to use the Windows Update Agent API to write a VBScript to automate the process

Edited by pootie tang

Share this post


Link to post
Share on other sites

If this is in a corporate setting then Microsoft WSUS is the way to go. You have a lot more control by running this server add on.

Share this post


Link to post
Share on other sites

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU]
"NoAutoUpdate"=dword:00000000
"AUOptions"=dword:00000003
"UseWUServer"=dword:00000001
"DetectionFrequencyEnabled"=dword:00000001
"DetectionFrequency"=dword:00000001
"RebootWarningTimeout"=dword:00000001
"RebootWarningTimeoutEnabled"=00000001

these are the reg keys of interest, read the following link for their use.

MS WSUS REG KEYS

Share this post


Link to post
Share on other sites

[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU]
"NoAutoUpdate"=dword:00000000
"AUOptions"=dword:00000003
"UseWUServer"=dword:00000001
"DetectionFrequencyEnabled"=dword:00000001
"DetectionFrequency"=dword:00000001
"RebootWarningTimeout"=dword:00000001
"RebootWarningTimeoutEnabled"=00000001

these are the reg keys of interest, read the following link for their use.

MS WSUS REG KEYS

Hmmm I dont have that in my registry...

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU

Share this post


Link to post
Share on other sites

Here is a very simple code to deploy Windows XP patches contained in a folder with just one click.

You can provide the path of the folder containing the patches from command-line or choose it from the GUI.

Hope it's useful for some of you.

Local $i,$sPatch, $sFolder

If $CMDLINE[0] = 0 Then
    $sFolder = FileSelectFolder("Select the Windows Patches folder", "")
    If @error = 1 Then Exit
Else
    $sFolder = $CMDLINE[1]
EndIf

; Shows the filenames of all files in the current directory.
$search = FileFindFirstFile($sFolder & "\WindowsXP-*.exe")  

; Check if the search was successful
If $search = -1 Then
    MsgBox(0, "Error", "No files/directories matched the search pattern")
    Exit
EndIf

While 1
    $file = FileFindNextFile($search) 
    If @error Then ExitLoop
    
    RunWait($sFolder & "\" & $file & " /passive /norestart")
    
    $i = $i + 1
    If $i <= 10 Then $sPatch = $sPatch & $file & @CRLF
    if $i = 11 Then $sPatch = $sPatch & "...and more..."
WEnd

; Close the search handle
FileClose($search)

#Region --- CodeWizard generated code Start ---
;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes and No, Icon=Info
If Not IsDeclared("iMsgBoxAnswer") Then Dim $iMsgBoxAnswer
$iMsgBoxAnswer = MsgBox(68,"WinPatch","Done! The following " & $i & " patches have been installed:" & @CRLF & @CRLF & $sPatch _
    & @CRLF & @CRLF & "Do you want to reboot Windows now?")
Select
    Case $iMsgBoxAnswer = 6 ;Yes
        Shutdown(2)
    Case $iMsgBoxAnswer = 7 ;No
        ;Continue
EndSelect
#EndRegion --- CodeWizard generated code End ---

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