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 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
Community Chosen Answer
You can use this query:
if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto AMD64 if /i "%PROCESSOR_ARCHITEW6432%"=="AMD64" goto AMD64 if /i "%PROCESSOR_ARCHITECTURE%"=="x86" goto x86
:: Installation 32bit
:: Installation 64bit