Error Calling External Script

  • Thread starter Thread starter Amy L.
  • Start date Start date
A

Amy L.

I am getting the following error "No process is associated with this object"
with the below code. Can someone please explain where the problem could be.
The code below is very simple and mostly pulled from the samples is the
docs.

try
{
Process extProcess = new Process() ;
extProcess.WaitForExit() ;
extProcess.StartInfo.FileName = externalScriptFilename ;
extProcess.Start() ;
}
catch( Exception e )
{
Console.WriteLine( "Details: " + e.Message ) ;
}
 
try replace "extProcess.StartInfo.FileName = externalScriptFilename ;"
with "extProcess.StartInfo.FileName = "wscript.exe " +
externalScriptFilename ; "
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top