title: Starting a process in VBS: path not found
body: <p>I need to make a simple vbs script to run some process' automatically. I found the following script on microsoft's website. It works fine to run notepad.exe the way the original example shows, but I'm trying to modify it to run myprog.exe. The full path to this program is: <code>C:\myprogdir\myprog.exe</code></p>
  
  <pre><code>Const SW_NORMAL = 1
  strComputer = "."
  strCommand = "myprog.exe" 
  strPath = "C:\myprogdir\"
  
  Set objWMIService = GetObject("winmgmts:" _
      &amp; "{impersonationLevel=impersonate}!\\" _
      &amp; strComputer &amp; "\root\cimv2")
  
  ' Configure the Notepad process to show a window
  Set objStartup = objWMIService.Get("Win32_ProcessStartup")
  Set objConfig = objStartup.SpawnInstance_
  objConfig.ShowWindow = SW_NORMAL
  
  ' Create Notepad process
  Set objProcess = objWMIService.Get("Win32_Process")
  intReturn = objProcess.Create _
      (strCommand, strPath, objConfig, intProcessID)
  If intReturn &lt;&gt; 0 Then
      Wscript.Echo "Process could not be created." &amp; _
          vbNewLine &amp; "Command line: " &amp; strCommand &amp; _
          vbNewLine &amp; "Return value: " &amp; intReturn
  Else
      Wscript.Echo "Process created." &amp; _
          vbNewLine &amp; "Command line: " &amp; strCommand &amp; _
          vbNewLine &amp; "Process ID: " &amp; intProcessID
  End If
  </code></pre>
  
  <p>I keep getting Return value: 9, which indicates "Path Not Found". However the path is correct. Is there something I'm not getting?</p>