Hi Leonel,
Well, since you can execute it using cmd.exe (as you wrote in the OP), try the
following:
Process process = Process.Start(
Environment.ExpandEnvironmentVariables("%comspec%" ), "/C SPIM.exe");
System.Threading.Thread.Sleep(200);
process.Close();
It's not a pretty solution, however.
If you don't have the comspec environment variable defined, then you can try
@"%windir%\system32\cmd.exe" instead. In this case, you might have to specify
the path for SPIM.exe as well.
HTH
(I'm running out of ideas ;)
--
Dave Sexton
"Leonel Galán" <le*********@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Actually I was trying to capture console output so I use that command
and others like
RedirectStandardOutput = True
But trying to make it simplier I notice that just the Start() command
and the exception is thrown.
Dave Sexton wrote:
Hi Leonel,
Try setting p.StartInfo.UseShellExecute to false.
--
Dave Sexton
"Leonel Galán" <le*********@gmail.comwrote in message
news:11*********************@h54g2000cwb.googlegro ups.com...
It appears that SPIM.exe is a CYGWIN application. And there is some
trouble with that. I'm not familiar with UNIX applications or CYGWIN
for running them on Windows, I thought it was a normal Win App. Maybe
someone familiar with this stuff can give me some advice.
The code it's just:
Process p = new Process();
p.StartInfo.FileName = "SPIM.exe";
p.Start();
Leonel Galán wrote:
When doing Process.Start(), I get "The parameter is invalid"
Win32Exception when opening a particular exe. This exe works good in
Windows (cmd.exe).
The exe is "SPIM.exe" as the Simulator for the MIPS assembling language
(http://www.cs.wisc.edu/~larus/spim.html).
I know that maybe that particular file has something strange, but I
thought someone could give me some advice.
Thanks,