View Full Version : shell


Matt_Hirst
04-04-2007, 08:34 AM
I have been given the dubious task of writing a front end to a data processing tool, basicly the front end needs to write a text file, it should then call the data processor(dos based fortran) the data processor then produces two output files.

I have used shell ("d:\matt\matt.exe", appwinstyle.maximisedfocus) this appears to call the dos based processor but it then closes down straight away without processing the file. If I double click the data processor, through windows explorer, it processes the file correctly.

Couple of questions:

What am I doing wrong - why does the dos file processor see the text file when manually started but not when started via VB?

What is the corret way of starting the dos file and then when the dos program returns control to the calling program, it continuing on it's merry way?

regards,

Matt

Elvis
04-26-2007, 04:58 AM
I was looking to open the windows calculator from within an application. I came across an article that said not to use the shell command and to use the following:

System.Diagnostics.Process.Start _
("C:\WINDOWS\system32\Calc.exe")

Might work for what you want, just change the path to your file.