473,883 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3548
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*********@gm ail.comwrote in message
news:11******** **************@ b28g2000cwb.goo glegroups.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.Fil eName = "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.Use ShellExecute to false.

--
Dave Sexton

"Leonel Galán" <le*********@gm ail.comwrote in message
news:11******** *************@h 54g2000cwb.goog legroups.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.Fil eName = "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

RedirectStandar dOutput = 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.Use ShellExecute to false.

--
Dave Sexton

"Leonel Galán" <le*********@gm ail.comwrote in message
news:11******** *************@h 54g2000cwb.goog legroups.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.Fil eName = "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.Exp andEnvironmentV ariables("%coms pec%"), "/C SPIM.exe");

System.Threadin g.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%\syst em32\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*********@gm ail.comwrote in message
news:11******** **************@ i42g2000cwa.goo glegroups.com.. .
Actually I was trying to capture console output so I use that command
and others like

RedirectStandar dOutput = 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.Use ShellExecute to false.

--
Dave Sexton

"Leonel Galán" <le*********@gm ail.comwrote in message
news:11******** *************@h 54g2000cwb.goog legroups.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.Fil eName = "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
2966
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 starting is that it has a welcome window first which gets displayed and then the real windows after a while,in other words it means that the process name is the same, but the handle I need to retrive is the one from the final window and not the...
18
4902
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) p.stdin.write("hostname\n") however, it doesn't seem to work. I think the cmd.exe is catching it.
3
4324
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 receiver is running within Process1. If I move the receiver into Process2 then its fast. Please can someone explain.
0
3188
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 System.Collections.Generic; using System.Net; using System.Net.Sockets; using System.Runtime.Serialization.Formatters.Binary;
6
1715
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 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.
1
4446
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 available to process this command" Source="System.Windows.Forms" ErrorCode=-2147467259 NativeErrorCode=8
5
5828
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) & selfProc & Chr(34)) The generated Exception:
7
20457
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 "Access is Denied" Win32Exception. What do i do to not generate this exception ? Any help highly appreciated, Thanks, Jay
2
6578
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 (Process currentProcess in processes) 04 { 05 if (null != currentProcess) 06 {
0
9942
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9792
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11142
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10745
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10848
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10417
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7972
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7130
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4614
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.