Updating Office 2010 to SP2
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
Answers (2)
Please log in to answer
Posted by:
tecrumors
11 years ago
You can use this query:
:: Installation
if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto AMD64 if /i "%PROCESSOR_ARCHITEW6432%"=="AMD64" goto AMD64 if /i "%PROCESSOR_ARCHITECTURE%"=="x86" goto x86
:x86
:: Installation 32bit
office_sp2_x86.exe /passive
:AMD64
:: Installation 64bit
office_sp2_x64.exe /passive
Posted by:
dugullett
11 years ago
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.
Comments:
-
Also that would not get the version of Office. Just the OS version. Unless you are doing x64 on x64, and x86 on x86? - dugullett 11 years ago
-
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. - studio196 11 years ago -
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:
https://social.technet.microsoft.com/Forums/office/en-US/3c8eaa94-a28b-4cc4-a84e-a242fd62ec72/ms-office-2010-bit-detection - snissen 11 years ago