title: Shell.Run with arguments
body: <p>I'm trying to run a program (with argument <code>/config</code>) using <code>Shell.Run</code> from VBS. However I'm having an exit code = 87 (cannot find the file specified).</p>
  
  <p>1st piece of code I've tried:</p>
  
  <pre><code>strCommand = """c:\Program Files\Test\launch.exe""" &amp; " /config:C:\sample.xml"
  intExit = objShell.Run(strCommand, 0, True)
  </code></pre>
  
  <p>2nd piece of code:</p>
  
  <pre><code>Dim FileExe, Argum
  FileExe = "%ProgramFiles%\Test\launch.exe"
  Argum = "/config:C:\sample.xml"
  
  RunMe FileExe, Argum
  
  Function RunMe(FileExe, Argum)
      Dim Titre, ws, Command, Exec
      Titre = "Execution avec argument"
      Set ws = CreateObject("WScript.Shell")
      command = "cmd /c "&amp; qq(FileExe) &amp; " " &amp; Argum &amp;" "
      Msgbox command, 64, Titre
      Exec = ws.Run(command, 0, True)
  End Function
  
  Function qq(str)
      qq = chr(34)&amp; str &amp;chr(34)
  End Function
  </code></pre>