System.Diagnostic.Process.Start Help

B

brian

I have a vb.net app using a shell command because I can't
figure out how to use the string with the
system.process.start. I would like to convert it so I
can do a little error checking to determine if the
process was successful or if it failed.

My shell command is:
c:\cwrsync\rsync.exe -vvrtz --progress --include=*.prx

I am calling the c:\cwrxync\rsync.exe and passing the
paramaters after that.

Can someone show me how to take this and sucessfully use
process.start.

I have tried passing the whole string and that doesn't
work.

process.start("c:\cwrsync\rsync.exe -vvrtz --progress --
include=*.prx")

Do I need to start the exe on it's own and then pass in
the paramaters?

Thanks
 
H

Herfried K. Wagner [MVP]

* "brian said:
I have a vb.net app using a shell command because I can't
figure out how to use the string with the
system.process.start. I would like to convert it so I
can do a little error checking to determine if the
process was successful or if it failed.

My shell command is:
c:\cwrsync\rsync.exe -vvrtz --progress --include=*.prx

I am calling the c:\cwrxync\rsync.exe and passing the
paramaters after that.

Can someone show me how to take this and sucessfully use
process.start.

I have tried passing the whole string and that doesn't
work.

process.start("c:\cwrsync\rsync.exe -vvrtz --progress --
include=*.prx")

Do I need to start the exe on it's own and then pass in
the paramaters?

\\\
Dim psi As New ProcessStartInfo()
psi.FileName = "foo.exe"
psi.Arguments = "--alltheotherstuff"
Process.Start(psi)
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top