Scripting Question

Updating Office 2010 to SP2

08/14/2013 8214 views

I am trying to create a script that detects what version x86 or x64 of office 2010 the machine has and install the appropriate service pack 2 update.

How can I get KACE to report back that the below script ran successfully. After the managed software installation deployment in KACE is done it reports back as failed even though it ran and updated office successfully.

@echo off
@echo Updating Office 2010. Please wait... IF EXIST "C:\Program Files (x86)\Common Files\microsoft shared\OFFICE14\Office Setup Controller\Setup.exe" goto office32 IF EXIST "C:\Program Files\Common Files\microsoft shared\OFFICE14\Office Setup Controller\Setup.exe" goto office64 goto neither :office32
@echo Updating Office 2010 32bit
office_sp2_x86.exe /passive goto end :office64
@echo Updating Office 2010 64bit
office_sp2_x64.exe /passive goto end :neither
@echo Office is not installed :end
0 Comments   [ + ] Show comments


Community Chosen Answer


You can use this query:


:: Installation


if /i "%PROCESSOR_ARCHITEW6432%"=="AMD64" goto AMD64

if /i "%PROCESSOR_ARCHITECTURE%"=="x86" goto x86



:: Installation 32bit

office_sp2_x86.exe /passive


:: Installation 64bit

office_sp2_x64.exe /passive
Answered 08/15/2013 by: tecrumors
6th Degree Black Belt

All Answers


It looks like you have your patches flipped. Program Files(x86) is x64. Program Files is x86. You may also want to look into %PROCESSOR_ARCHITECTURE% instead of checking program files.

Answered 08/14/2013 by: dugullett
Red Belt

  • Also that would not get the version of Office. Just the OS version. Unless you are doing x64 on x64, and x86 on x86?
  • I am only detecting the office version not the OS version because most of our x64 windows 7 machines have 32bit office installed due to third party plugin compatibility. I was shooting for one script to that would take care of our 64bit office installs as well.
    The script runs and does what it is suppose to do...launch the correct SP2 install. However KACE reports back as it failing..
    I also have Agent logging enabled.
  • Here is a Microsoft technote that explains a registry value to use to determine Office bitness, but only if Outlook is installed as part of Office:

This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ