none
Need a script to check the version of Office365 Pro Plus to push our office updates RRS feed

  • Question

  • I need a script that could check the version of office365 pro plus e.g ( 15.0.4711.1002) and if it doesn't exists on users machine than to deploy a latest version from a network location

    I have an XML which works fine with downloading and even when deploying onto test machine but would not work on users which has an encrypted HDD and windows firewall turned on. the machine don't seem to pull the updates from Microsoft hence why wanted to deploy the updates through a GPO start-up script

    Currently the script would run the setup countless times without checking version and exiting the process if the version found. I hope the information given is adequate. Thanks


     

    Friday, May 1, 2015 8:40 AM

Answers

  • Frederik, After some tweaking and testing i was able to get it working, I haven't tested it via GPO as a startup script but standalone it is doing what i was after. I cant thank you enough for helping me on this as i had lost hope after days worth of intense searching.


    Thanks for the feedback. Please mark my reply as "Answer" to this thread.
    • Marked as answer by fzameen Thursday, May 7, 2015 8:12 AM
    Friday, May 1, 2015 10:03 PM

All replies

  • I need a script that could check the version of office365 pro plus e.g ( 15.0.4711.1002) and if it doesn't exists on users machine than to deploy a latest version from a network location


    Sorry, this is not a dial-a-script forum. Respondents will gladly help you with your own script but will not write it for you.
    Friday, May 1, 2015 9:27 AM
  • Below is what i got and wondered if someone could help me in rectifying it, I need it to read the Version value and execute if it doesn't find 15.0.4711.1002

    setlocal

    REM *********************************************************************
    REM Environment customization begins here. Modify variables below.
    REM *********************************************************************

    REM Set DeployServer to a network-accessible location containing the Office source files.
    set DeployServer=\\contoso\c2r\Office365 update\

    REM Set ConfigFile to the configuration file to be used for deployment (required)
    set ConfigFile=\\contoso\c2r\Office365 update\Customconfig.xml

    REM Set LogLocation to a central directory to collect script log files (install log files are set in XML file).
    set LogLocation=C:\AppData\Local\Temp

    REM *********************************************************************
    REM Deployment code begins here. Do not modify anything below this line (check quotes are quotes though).
    REM *********************************************************************


    REM Operating system is X64. Check for Office365 version in emulated propertyBag registry key
    :ARP64

    Reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag Version=%15.0.4711.1002%
    if NOT %errorlevel%==1 (goto DeployOffice) (goto End)

    REM If 1 returned, the product was not found. Run setup here.
    :DeployOffice
    echo %date% %time% Setup started. >> %LogLocation%\%computername%.txt
    start /wait %DeployServer%\setup.exe /configure %ConfigFile%
    echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt

    REM If 0 or other was returned, the product was found or another error occurred. Do nothing.
    :End

    Endlocal

    Friday, May 1, 2015 10:10 AM
  • You should post this in the Office deployment forum. They will point you at instructions and tools for enterprise deployment of Office Click-To-Run.  They will also assist you in setting up a GPO to ensure that updates are distributed.

    The script you posted already checks for the version.  Unfortunately Office click to run cannot be updated that way.


    \_(ツ)_/


    • Edited by jrv Friday, May 1, 2015 10:28 AM
    Friday, May 1, 2015 10:27 AM
  • It seems you copied this script from somewhere, then modified this line to suit your environment:

    Reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag Version=%15.0.4711.1002%

    This will not work. You need to query the data assigned to the value

    HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag/Version

    then check it in a separate step. What do you get when you type this command at the console (cmd.exe)?

    reg query HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag /v Version

    Friday, May 1, 2015 10:30 AM
  • This will show me the version of the office365

    C:\windows\system32>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\ClickToRun
    \propertyBag /v /version

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\ClickToRun\propertyBag
        Version    REG_SZ    15.0.4675.1002

    what else do i need  to add in front of /v Version for it to query the specific value/version, I tried /v /version=15.0.4675.1002 and i get the below 

    C:\windows\system32>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\15.0\ClickToRun
    \propertyBag /v /version=15.0.4675.1002
    The system cannot find the path specified.

    Friday, May 1, 2015 11:37 AM
  • Here is a streamlined version of your batch file. You must test it at the Command Prompt in order to see if it works properly. To activate it, you must remove the word "echo" to the left of the word "start".

    @echo off
    REM *********************************************************************
    REM Environment customization begins here. Modify variables below.
    REM *********************************************************************
    REM Set DeployServer to a network-accessible location containing the Office source files.
    set DeployServer=\\contoso\c2r\Office365 update\

    REM Set ConfigFile to the configuration file to be used for deployment (required)
    set ConfigFile=\\contoso\c2r\Office365 update\Customconfig.xml

    REM Set LogLocation to a central directory to collect script log files (install log files are set in XML file).
    set LogLocation=C:\AppData\Local\Temp

    REM *********************************************************************
    REM Deployment code begins here.
    REM *********************************************************************
    REM Operating system is X64. Check for Office365 version in emulated propertyBag registry key
    set Key=HKLM\SOFTWARE\Microsoft\Office\15.0\ClickToRun\PropertyBag
    for /F "tokens=3" %%a in ('Reg query %Key% /v Version') do set Version=%%a
    echo Version=%Version%
    if "%Version%"=="15.0.4675.1002" (echo Office is up-to-date & goto :eof)

    echo %date% %time% Setup started. >> %LogLocation%\%computername%.txt
    echo start /wait %DeployServer%\setup.exe /configure %ConfigFile%
    echo %date% %time% Setup ended with error code %errorlevel%. >> %LogLocation%\%computername%.txt

    • Proposed as answer by Frederik Long Friday, May 1, 2015 10:02 PM
    Friday, May 1, 2015 12:17 PM
  • You're
    invited to our featured webcast, Proven Practices for
    Office 365 Deployment, Security and Management
    , which will explain
    how the single sign-on and automated account provisioning for Office365 can
    stop the cloud password sprawl, close security holes and free up IT time for
    new projects.
    <o:p></o:p>

    This webcast will cover topics such as
    how to drive cloud app adoption and eliminate password sprawl and how to
    centralize, standardize and automate access management – across apps and
    devices
    . <o:p></o:p>

    We hope to
    see you there! <o:p></o:p>

    Register Now



    Presented by: Microsoft Certified Professional Magazine Online <o:p></o:p>



    \_(ツ)_/

    Friday, May 1, 2015 2:36 PM
  • Frederik, After some tweaking and testing i was able to get it working, I haven't tested it via GPO as a startup script but standalone it is doing what i was after. I cant thank you enough for helping me on this as i had lost hope after days worth of intense searching

    Change that i had to apply ( space in a network path was causing a "path not found error", Had to rename the "Office365 update" and update the path in Customconfig.xml  or any other location that was pointing to "office365 update" )

     set DeployServer=\\contoso\c2r\Office365 update\      


    REM Set ConfigFile to the configuration file to be used for deployment (required)
    set ConfigFile=\\contoso\c2r\Office365 update\Customconfig.xml

    REM Set LogLocation to a central directory to collect script log files (install log files are set in XML file).
    set LogLocation=C:\AppData\Local\Temp

    Friday, May 1, 2015 4:27 PM
  • Frederik, After some tweaking and testing i was able to get it working, I haven't tested it via GPO as a startup script but standalone it is doing what i was after. I cant thank you enough for helping me on this as i had lost hope after days worth of intense searching.


    Thanks for the feedback. Please mark my reply as "Answer" to this thread.
    • Marked as answer by fzameen Thursday, May 7, 2015 8:12 AM
    Friday, May 1, 2015 10:03 PM
  • Is there anyway that a above script could be amended for it to display the install/update process. Would this be possible with the script or config.xml pushed through startup GPO. Thanks a butch for your help on the script Frederik, it is working as expected
    Wednesday, May 6, 2015 9:02 AM
  • Would this be possible with the script or config.xml pushed through startup GPO. Thanks a butch for your help on the script Frederik, it is working as expected

    Since this is a new question, I recommend that you mark my reply in this thread as "Answer", then start a new thread with the word "Policy" in the Subject line.
    Wednesday, May 6, 2015 4:59 PM
  • Since you are asking about a GPOO you should post in the GP forum.

    I still recommend O365 deployment forum for your issues.


    \_(ツ)_/

    Wednesday, May 6, 2015 5:00 PM