title: Usb Autorun and Batch File
body: <p>I am trying to set up an autorun.inf file and batch file in order to check to see if a program is installed.  If not, I want to run the install file upon plugging in the usb drive. Here is my code:</p>
  
  <pre><code>setlocal
  set VMP=C:\Program Files\VMware\VMware Player\
  cd C:\Program Files\VMware\VMware Player\
  if exist %VMP% (
  start vmx
  ) else (
  start VMware-player-2.5.2-156735.exe 
  )
  </code></pre>
  
  <p>vmx is a shortcut in the root of the usb stick that points to the .vmx file I want to run.  It is opening both files at the same time regardless of whether %VMP% exist.  Can anyone help me out?</p>