process.start

B

Brian Shannon

I need to use System.Diagnostics.Process.Start and am having a hard time
formatting my string.

My process is: "C:\Visual Cut.exe"
And my arguments are:
-e "C:\TimeTrackingDaily.rpt" "Parm1:Yesterday"

I need help formatting my arguement to include all the quotes and spacing.
The spacing needs to be exact and the quotes need to be in place otherwise
the program being called will fail.

If this helps my batch file looks like:
"C:\Visual Cut.exe" -e "C:\TimeTrackingDaily.rpt" "Parm1:Yesterday"

If someone could help me I would greatly appreciate it.

Is there a way to include quotes within quotes such as

dim quote as string
quote = "hello my name is "Brian""
Where Brian has quotes around the name when displayed?

Thanks
 
B

Bobby Ryzhy

For the quotes you will need to use an escape charachter - in c# it is
a \. So it would look like - quote = "hello my name is \"Brian\"".
Or you can just use the char twice like this - quote = "hello my name
is ""Brian""".

Bobby Ryzhy
bobby@ name of domain below
http://www.weekendtech.net
 
S

Sunny

string params = "-e C:\\TimeTrackingDaily.rpt\" \"Parm1:Yesterday\"";

Hope that helps
Sunny
 
B

Brian Shannon

Does the \ work as an escape character in VB as well as C. I am using
VB.NET

Thanks
 
S

Sunny

Oh, sorry, I don't know in VB.Net.
But there should be some kind of a escape char.

If my memory serves me correct, in ASP and VBE I was able to use "", so
you may try in VB.Net as well

Sunny
 

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

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top