473,394 Members | 1,481 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Win32Exception at Process.Start()

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,

Nov 14 '06 #1
6 1697
Hi Leonel,
can you post complete example code so it makes your issue easier to resolve.

Thanks
Mark.
--
http://www.markdawson.org
"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,

Nov 14 '06 #2
Hi Leonel,

It sounds to me like you're missing or have used an incorrect command-line
argument.

--
Dave Sexton

"Leonel Galán" <le*********@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
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,

Nov 14 '06 #3
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,
Nov 16 '06 #4
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,

Nov 16 '06 #5
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,
Nov 16 '06 #6
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,

Nov 17 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: serge calderara | last post by:
Dear all, I have an application which is suppose to start another executable process. As soon as that process is running, I need to retrive its handle. The problem of the particular process I am...
18
by: jas | last post by:
Hi, I would like to start a new process and be able to read/write from/to it. I have tried things like... import subprocess as sp p = sp.Popen("cmd.exe", stdout=sp.PIPE)...
6
by: Dmitri Shvetsov | last post by:
Hi, Can I start an external process from the Web Service? I'm using a code, compiler keeps silence, compiles ok and starts the project. When I trace in Debugger it doesn't start an external...
3
by: BuddyWork | last post by:
Hello, Could someone please explain why the Socket.Send is slow to send to the same process it sending from. Eg. Process1 calls Socket.Send which sends to the same IP address and port, the...
0
by: Buddy Home | last post by:
There is two examples of code. Example 1. Send and Receive within the same process. Put this code in a console app called SendAndReceive and run the code. using System; using...
6
by: Leonel Galán | last post by:
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...
1
by: nhmark64 | last post by:
Hi, Sometimes when I execute this.Opacity = 0; in the Main thread I get the below exception: System.ComponentModel.Win32Exception was unhandled by user code Message="Not enough storage is...
5
by: Atara | last post by:
On Windows Vista, Process.Start() generates Win32Exception. Sample Code: Dim selfProc As String = System.Windows.Forms.Application.ExecutablePath System.Diagnostics.Process.Start(Chr(34) &...
7
by: =?Utf-8?B?ams=?= | last post by:
I am using System.Diagnostics.Process class to open a word document by call ing Process.Start("test.doc"). I am using C# as programming language. On some of the computers on running this code i get...
2
by: Tim | last post by:
Hey guys, I tried to get a process handle with the following code snippet: 00 Process processes = Process.GetProcesses(); 01 if (null != processes && processes.Length 0) 02 { 03 foreach...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.