While working on a script for an upcoming project, I wanted to test for the presence of various Office versions, including 32-bit and 64-bit components before initiating setup. Here’s one way I found:
@ECHO OFF SET CURRLOCATION32="C:\Program Files (x86)\Microsoft Office\root\Office16" SET CURRLOCATION64="C:\Program Files\Microsoft Office\root\Office16" SET PREV1LOCATION32="C:\Program Files (x86)\Microsoft Office\root\Office15" SET PREV1LOCATION64="C:\Program Files\Microsoft Office\root\Office15" SET PREV2LOCATION32="C:\Program Files (x86)\Microsoft Office\root\Office14" SET PREV2LOCATION64="C:\Program Files\Microsoft Office\root\Office14" REM Check for 64-bit versions IF EXIST ""%CURRLOCATION64%\MANIFEST.XML""… [ Continue reading ]
