Batch file check office architecture version
<p>I have the following script, that will print the current version of office and the architecture of the OS</p>

<pre class="lang-vb prettyprint-override"><code>Echo off&amp;SetLocal
Set "KEY="&amp;Set "GUID="&amp;Set "IOV="&amp;Set "MWB=32"&amp;Set "MOB=32"
Echo=%PROCESSOR_ARCHITECTURE% %PROCESSOR_ARCHITEW6432%|Find "64"&gt;Nul&amp;&amp;(
   Set "KEY=\Wow6432Node"&amp;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&amp;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=&amp;Echo= Office 20%IOV% %MOB%-bit Product installed on a %MWB%-bit OS
:EndIt
</code></pre>

<p>I would like to customize this script to to make some other stuff if the output is like this</p>

<blockquote>
  <p>Office 20?? 32-bit Product installed on a 64-bit OS</p>
</blockquote>

<pre><code>If Echo= Office 2007 32-bit Product installed on a 64-bit OS (run another script or command)
</code></pre>

<p>Can somebody help me implement this?</p>