OK so I had an issue that Microsoft released an update for Windows XP that I needed to install but they didn’t do an MSI so I couldn’t deploy is using GPO which was a real pain.

Instead I created a script that would check the OS Version and see if the update was already installed.

  1. First we hide the script from users:
    [crayon]@ECHO Off[/crayon]
  2. Then we check they are running the correct OS (for windows 7 “Version 6.1”)
    [crayon]ver | find “Windows XP” >NUL
    if errorlevel 1 goto end[/crayon]
  3. Check to see if the update is installed (chance the reg location depending on the install)
    [crayon]reg QUERY “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Windows XP\SP20\KB943729” >NUL 2>NUL
    if errorlevel 1 goto install_update
    goto end[/crayon]
  4. Then if it is the correct OS and the update isn’t installed run the exe
    \PUT_YOUR_SHARE_PATH_HERE\Windows-KB943729-x86-ENU.exe /passive /norestart[/crayon]
  5. End (this is added so that the script will stop if the criteria are not met before the update is installed stopping errors.
  6. you can then add this to a group policy to allow it to be deployed