title: How to launch .exe from vbscript on windows server 2003
body: <p>I've got a script which needs to run on various different versions of windows server, including 2003. Yeah, I already KNOW it's "unsupported". </p>
  
  <p>My script has to launch an executable, in a hidden window (though the code to do this is not shown below, because I was asked to cut it down to the bare minimum). I'm currently using win32_Process.Create as follows:</p>
  
  <pre><code>Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
  errReturn = objProcess.Create("C:\myprog.exe", null, null, intProcessID)
  </code></pre>
  
  <p>This works ok on 2008 and 2012, but it is to be failing on 2003 with error code 3 "Insufficient privilege" returned in <code>errReturn</code>. It also works when run through cmd.exe, as an ordinary user, but the parent program is a service, check_mk_agent.exe, and so is not an "ordinary user". This script is run as one of check_mk_agent.exe's plugins.</p>
  
  <p>I'm now going to work out how to use <code>runas</code> to try to simulate running it as the same user as the service runs as.</p>