473,503 Members | 2,157 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

shell Quastion : How to run console exe with C# with Arguments?

Hello ,
i have an exe programme that i need to call from C# Programm that i
wrote but with Arguments.
for example

compress.exe "MyFolder" "zipPassword"
P.s. i know that the System.Diagnostics.Process mybe doing that but i
have tried and it did not work , help for me will be an example !

Thank you

Saleh Matani
Nov 17 '05 #1
2 6293
Look at one of the overloads of the Process.Start. One of them takes a
string array of arguements. I think it's something like
Process.Start("compress.exe", new string[]{MyFolder, zipPassword}); though I
haven't tested this.

Scott
"Saleh Matani" <sa***@matani.net> wrote in message
news:uu****************@TK2MSFTNGP14.phx.gbl...
Hello ,
i have an exe programme that i need to call from C# Programm that i wrote
but with Arguments.
for example

compress.exe "MyFolder" "zipPassword"
P.s. i know that the System.Diagnostics.Process mybe doing that but i
have tried and it did not work , help for me will be an example !

Thank you

Saleh Matani

Nov 17 '05 #2
Hi,

Did you check the properties and methods of Process ?

You have a couple of options:
1- Process.Start( commandName, commandArguments )
2- If you are using ProcessStartInfo
Set ProcessSTartInfo.Arguments
cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Saleh Matani" <sa***@matani.net> wrote in message
news:uu****************@TK2MSFTNGP14.phx.gbl...
Hello ,
i have an exe programme that i need to call from C# Programm that i wrote
but with Arguments.
for example

compress.exe "MyFolder" "zipPassword"
P.s. i know that the System.Diagnostics.Process mybe doing that but i
have tried and it did not work , help for me will be an example !

Thank you

Saleh Matani

Nov 17 '05 #3

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

Similar topics

3
3471
by: Eli Criffield | last post by:
I'm try run an ssh command in pexpect and I'm having trouble getting everything escaped to do what i want. Here's a striped down script showing what i want to do. -- #!/usr/bin/env python...
9
5028
by: Tommy Lu | last post by:
Hi, wondering if there is a way to interact the shell command with the C# program? For example, if I type c:\>ver it then suppose to return the version of the OS I am currently using... or ...
3
6245
by: moondaddy | last post by:
I need to start an ms access 2003 app from a vb.net winforms app and didn't want to load all the interop stuff for office into the .net project. I thought that using the shell cmd would be a nice...
4
15034
by: Kevin Mansel via .NET 247 | last post by:
Ok, basically this is my problem. I'm building a console app tocall a dos program. So i'm using the Shell command to call theprogram, now depending on what happens, I want to read theoutput that...
4
2361
by: Anastasios Hatzis | last post by:
I'm looking for a pattern where different client implementations can use the same commands of some fictive tool ("foo") by accessing some kind of API. Actually I have the need for such pattern for...
11
11886
by: Jon Davis | last post by:
Does anyone know why using System.Diagnostics.Process to "wrap" a console application does not always transmit the I/O, depending on what processes you're trying to "consume"? PowerShell, for...
3
10097
by: Alex | last post by:
Hello, I'm wroting a console utility in VB 2005, and I need the ability to pass parameters to the application when the program runs. For example, if my program is called testing.exe, I need to...
5
5066
by: inetquestion | last post by:
I am looking for a web interface for shell commands or shell scripts. Does anyone know of any exexisting php scripts which would solve this requirement? PHP form accepts input from a user, then...
3
5094
by: gisto moss | last post by:
i have to implement the shell such that it accepts commands, together with parameters. Assume all possible commands have either 0 or 1 parameter. I need to check this. if(commandstrings.length>2)...
0
7205
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
7093
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...
0
7287
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,...
0
7467
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...
1
5022
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...
0
3177
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3168
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
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 ...
1
746
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.