title: vbs cmd path space
body: <p>I would like to be able to call the following cmd command from within a vbs script:</p>
  
  <pre><code>cmd Client\setupclient.exe /q /targetdir "c:\program files\Microsoft CRM"
  </code></pre>
  
  <p>I came up with the following vbs script:</p>
  
  <pre><code>Set oShell = WScript.CreateObject ("WScript.Shell") 
  oShell.Run "cmd /c Client\setupclient.exe /q /targetdir c:\program files\Microsoft CRM", 1, true
  </code></pre>
  
  <p>As far as I am concerned, this would work properly if the targetdir had no spaces, e.g c:\bla. Then the app would be installed in that particular folder.</p>
  
  <p>The obvious question is, how can I define the targetdir with spaces as the path location.<br>
  I tried to surround it with ' ' but that didn't work for me. Any suggestions?</p>
  
  <p>Cheers
  chris</p>