Announcement

Collapse
No announcement yet.

Start Script to Check for File Versions

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Start Script to Check for File Versions

    I would like to create a GPO startup script that does the following:

    1. Check to see if Office SP3 is installed. If not installed, the script
    ends. If it's installed,

    2. Check to see if patch X is installed. If it's installed, the script ends.
    If Patch X is not installed, install Patch X.

    In order to check for SP3, I'm thinking about looking at MSO.dll file from the common files folder. I'm aware of filever.exe, but how do I incorporate that into the script? Or, is there a simpler way to do this?

    I would like to stick to batch scripting for now as I'm not familiar with VBScript.

    Any help? Thanks.

  • #2
    Re: Start Script to Check for File Versions

    What I have so far is this and it seems to work for now. If anyone has suggestions to make it more robust, let me know.

    Code:
    @echo off
    
    setlocal
    set file="c:\Program Files\Common Files\Microsoft Shared\OFFICE11\mso.dll"
    
    for %%I in (%file%) do set filesize=%%~zI
    if %filesize% equ 12259160 (
    goto :patch
    ) else (
    goto :end
    )
    
    endlocal
    
    :patch
    reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\9040110900063D11C8EF10054038389C\Patches\A810DC54C09781E41A714741A1FB43A1" /v Installed 2> nul
    if %errorlevel%==1 (
    goto :install 
    ) else (
    goto :end
    )
    
    :install
    msiexec /p outlook.msp /qn /norestart
    
    :end
    exit
    Last edited by parklabel; 20th February 2008, 02:13.

    Comment

    Working...
    X