title: Batch file to check os architecture and then execute appropriate exe
body: <p>I am trying to write a batch file which will ease the process of installing drivers for our users.</p>
  
  <p>The batch file needs to check what version of os (64bit or 32bit) the code is running on and then execute the appropriate <code>.exe</code>.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>set os_version=wmic os get osarchitecture
  echo "%os_version%"
  pause
  
  IF os_version = "64-bit"
  @run 64 bit
  start /d "%0" CP210xVCPInstaller_x64.exe
  ELSE
  @run 32 bit
  start /d  "%0" CP210xVCPInstaller_x86.exe
  </code></pre>
  
  <p>Now I am having an issue with assigning the output of the command <code>wmic os get osarchitecture</code> to a variable.</p>
  
  <p>Then I need to check if it is equal to <code>64-bit</code> and if so execute a <code>.exe</code> in the same location as the bat file?</p>
  
  <p>Second Question is how do I run a <code>.exe</code> from the same directory as the bat file?</p>