Kaseya Community

How are others deploying manual patches like Vista SP1?

  • I am curious how others are deploying manual Microsoft patches like Vista SP1?
    Thanks!

    Legacy Forum Name: How are others deploying manual patches like Vista SP1?,
    Legacy Posted By Username: Coldfirex
  • I have successfully deployed Vista SP1 via Kaseya scripting. I have two scripts - one to use curl-nossl.exe to download the EXE file from the MS website to a shared folder on the file server at the client's office, and another one to copy the EXE file from that shared filesource folder to the lcoal machine and execute and log, etc.

    Many scripts that others have posted have helped me, so hopefully these scripts will help you.

    You will have to make some edits. At aminimum:
    - TargetDrivePath needs set to the desired local folder on the server,
    - emailaddress@yourdomain.com needs updated.
    - WolfTrack is our company branded name for Kaseya. You will have to update that to your branded name.
    - server name in step 3 in second script. In some other scripts, I have used sSystem variables. Looking back, I am not sure why I didn't do that in this script.
    - Last step in the second script calls our Reboot with Prompt Script. You will have to subsisite fo your own. There are samples on the Script Forum, if you don;t aleady have one of your own.

    As a background, I have a template script for downloading files. I copy that script and change the variable values for the filenames - which is why these scripts set variable values for filenames, and then later refer to those filenames when downloading or executing the files. Seems longer then necessary when you look exclusively at these scripts, but make creating a new script for the nerxt EXE file download and installation a breeze.

    I also through the KB executed into the Kaseya log in order for this patching to get counted in the Executive Summary Report.

    Hoep you find this helpful


    ==================================
    Script Name: Get Windows Vista SP1 x86 (KB936330) file
    Script Description: Get Windows Vista SP1 x86 (KB936330) file from http location, save to local d:\wolftrack_file_source folder, send email confirmation

    IF True
    THEN
    Get Variable
    Parameter 1 : 2
    Parameter 2 : d:\wolftrack_file_source
    Parameter 3 : TargetDrivePath
    OS Type : 0
    Get Variable
    Parameter 1 : 2
    Parameter 2 : Windows6.0-KB936330-X86-wave0.exe
    Parameter 3 : FileName
    OS Type : 0
    Get Variable
    Parameter 1 : 2
    Parameter 2 : http://download.microsoft.com/download/3/a/9/3a9b72c2-527d-4694-8a49-84c056d4c34d/Windows6.0-KB936330-X86-wave0.exe
    Parameter 3 : URL_plus_Filename
    OS Type : 0
    Get Variable
    Parameter 1 : 2
    Parameter 2 : notifylist@wolfconsulting.com
    Parameter 3 : EmailAddress
    OS Type : 0
    Write Script Log Entry
    Parameter 1 : TargetDrivePath=#TargetDrivePath# , URL=#URL_plus_Filename# , FileName=#FileName#
    OS Type : 0
    Write File
    Parameter 1 : #TargetDrivePath#\curl-nossl.exe
    Parameter 2 : VSASharedFiles\curl-nossl.exe
    OS Type : 0
    Execute File
    Parameter 1 : #TargetDrivePath#\curl-nossl.exe
    Parameter 2 : #URL_plus_Filename# -k -C - -o "#TargetDrivePath#\#FileName#"
    Parameter 3 : 3
    OS Type : 0
    Write Script Log Entry
    Parameter 1 : Downloaded file #FileName# from #URL_plus_Filename# and saved to #TargetDrivePath#
    OS Type : 0
    Execute Shell Command
    Parameter 1 : eventcreate /L APPLICATION /T INFORMATION /SO WolfTrack /ID 999 /D "Downloaded file #FileName# from #URL_plus_Filename# and saved to #TargetDrivePath#"
    Parameter 2 : 1
    OS Type : 0
    Get Variable
    Parameter 1 : 6
    Parameter 2 :
    Parameter 3 : Machine
    OS Type : 0
    Send Email
    Parameter 1 : #EmailAddress#
    Parameter 2 : #Machine# Downloaded file #FileName#
    Parameter 3 : #Machine# Downloaded file #FileName# from #URL_plus_Filename# and saved to #TargetDrivePath#
    OS Type : 0
    ELSE
    ==================================



    ==================================
    Script Name: Windows Vista SP1 (KB936330) x86 install
    Script Description: Install Windows Vista SP1 KB936330 x86. Copy Windows6.0-KB936330-X86-wave0.exe file from file source to local agent temp directory, execute, delete file, then reboot.

    IF True
    THEN
    Get Variable
    Parameter 1 : 2
    Parameter 2 : Windows6.0-KB936330-X86-wave0.exe
    Parameter 3 : FileName
    OS Type : 10
    Get Variable
    Parameter 1 : 2
    Parameter 2 : /quiet /norestart
    Parameter 3 : Command_Line_Parameters
    OS Type : 10
    Get Variable
    Parameter 1 : 2
    Parameter 2 : \\sbserver1\wolftrack_file_source
    Parameter 3 : WolfTrack_File_Source
    OS Type : 10
    Get Variable
    Parameter 1 : 2
    Parameter 2 : KB936330
    Parameter 3 : Patch_KB_Article
    OS Type : 10
    Get Variable
    Parameter 1 : 2
    Parameter 2 : Windows Vista SP1
    Parameter 3 : Patch_Description
    OS Type : 10
    Get Variable
    Parameter 1 : 10
    Parameter 2 :
    Parameter 3 : AgentTemp
    OS Type : 10
    Use Credential
    OS Type : 10
    Execute Shell Command
    Parameter 1 : copy /Y "#WolfTrack_File_Source#\#FileName#" "#AgentTemp#\#FileName#"
    Parameter 2 : 0
    OS Type : 10
    Execute File
    Parameter 1 : "#AgentTemp#\#FileName#"
    Parameter 2 : #Command_Line_Parameters#
    Parameter 3 : 3
    OS Type : 10
    Pause Script
    Parameter 1 : 10
    OS Type : 10
    Delete File
    Parameter 1 : "#AgentTemp#\#FileName#"
    OS Type : 10
    Execute Shell Command
    Parameter 1 : eventcreate /L APPLICATION /T INFORMATION /SO WolfTrack /ID 999 /D "Patch #Patch_KB_Article# executed (#Patch_Description#)."
    Parameter 2 : 1
    OS Type : 10
    Write Script Log Entry
    Parameter 1 : Patch #Patch_KB_Article# executed (#Patch_Description#)
    OS Type : 10
    Execute Script
    Parameter 1 : Reboot with User Prompt 1 (Master) (NOTE: Script reference is NOT imported. Correct manually in script editor.
    Parameter 2 :
    Parameter 3 : 0
    OS Type : 10
    ELSE
    ==================================

    Legacy Forum Name: How-To,
    Legacy Posted By Username: lwolf
  • Quick additional note..

    Watch out for the shutdown and reboot times with applying SP1 for Vista.

    After the script runs, the shutdown and restart takes a good 20+ minutes, as the Operatign System applies the updates. Some progress % is displayed on the console.

    Legacy Forum Name: How-To,
    Legacy Posted By Username: lwolf