i found on this great forum, the solution for the first part of what i need to do, that is check for multiple conditions of office,
here is the topic and the script,
Code: Select all
http://www.dostips.com/forum/viewtopic.php?t=5383
the script i choose is this,
Code: Select all
@Echo off&SetLocal
Set "KEY="&Set "GUID="&Set "IOV="&Set "MWB=32"&Set "MOB=32"
Echo=%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%|Find "64">Nul&&(
Set "KEY=\Wow6432Node"&Set "MWB=64")
Set "KEY=HKLM\Software%KEY%\Microsoft\Windows\CurrentVersion\Uninstall"
For /f "Delims=" %%a In ('Reg Query %KEY% /k /f "*-001B-*0FF1CE}"') Do (
If Not Defined GUID Set "GUID=%%~nxa")
If Not Defined GUID (Echo=Unable to find Office Product&GoTo :EndIt)
If %GUID:~20,1% Equ 1 Set "MOB=64"
If %GUID:~4,1% Equ 4 (Set IOV=10) Else (If %GUID:~4,1% Equ 2 (Set IOV=07) Else (
If %GUID:~4,1% Equ 5 (Set IOV=13) Else (Set IOV=??)))
Echo=&Echo= Office 20%IOV% %MOB%-bit Product installed on a %MWB%-bit OS
:EndIt
TimeOut /t 5 1>Nul
Now i need to do some other stuff only if the output is
Office 2007 32-bit Product installed on a 64-bit OS
My intention is to upgrade my office suite on multiple PC via a network share,
and i would like to install on a clean situation, so first of all , want to check if office 32 bit is installed on OS 64 bit,
if office 32 bit is installed on OS 64, i want to remove it, and install office 64 bit.
i already have configured my script that can uninstall all version of office, based on ProductID, but as i stated before i would like to call the uninstall script only if office 32 is on 64 bit OS.
Could you please edit this script to call my second script based on that output?
Thanks in advance.
Regards