title: Why do I get 0x80070002 error calling a C# COM object from VB when launched from C#?
body: <p>I have a C# COM object in a dll that I have registered using regasm.exe. 
  I do a createObject on the COM object and call methods on the object in a vbs script run with cscript.</p>
  
  <p>If I run this on the command line it all works properly, creates the object calls the method via com.</p>
  
  <pre><code>cscript.exe c:\mypath\myvb.vbs argument
  </code></pre>
  
  <p>I now am trying to run this same command from C#. I use the System.Diagnostics.Process methods</p>
  
  <pre><code>ProcessStartInfo si = new ProcessStartInfo();
  si.Filename = "cscript.exe";
  si.Arguments = "c:\mypath\myvb.vbs argument";
  Process exe = ProcessStart(si);
  ...
  </code></pre>
  
  <p>When I run this way I get the 0x80070002 error , which is basically a file not found error. I dont understand why it is different from C# to the command line.</p>
  
  <p>Edit - More Info</p>
  
  <p>I am running on a 64bit OS. The C# COM dll was built with "AnyCPU" .
  I used the 64bit regasm. 
  The cscript I used was from c:\windows\system32 so it was the 64 bit version.</p>
  
  <p>From the command line if I deliberately use the 32 bit version of cscript I also get the 0x80070002 error. This leads me to suspect the problem from c# is related, but I still don't get it.</p>