Diagnostics.process
-
Hi I want to open other file types using my form I used (
Process.start("sth.exe","sth.sth");
) it works some times but some times when(I think) the path name have space within it ,it causes error like this (Process.start("wmplayer.exe","track 01.mp3");)
if I write this one (Process.start("wmplayer.exe","track01.mp3");) instead of the above one it works can any one explain it to me and a solution please. -
Hi I want to open other file types using my form I used (
Process.start("sth.exe","sth.sth");
) it works some times but some times when(I think) the path name have space within it ,it causes error like this (Process.start("wmplayer.exe","track 01.mp3");)
if I write this one (Process.start("wmplayer.exe","track01.mp3");) instead of the above one it works can any one explain it to me and a solution please.The second parameter is interpreted as argument to the process you are starting. If it includes spaces, then the string will be split by spaces and resulted strings will be passed as multiple arguments.
#region signature my articles #endregion
-
Hi I want to open other file types using my form I used (
Process.start("sth.exe","sth.sth");
) it works some times but some times when(I think) the path name have space within it ,it causes error like this (Process.start("wmplayer.exe","track 01.mp3");)
if I write this one (Process.start("wmplayer.exe","track01.mp3");) instead of the above one it works can any one explain it to me and a solution please. -
As far as I remember you will need to enclose the parameter itself with quotes but I'm not sure if that will help. Give it a try.
#region signature my articles #endregion
-
Hi I want to open other file types using my form I used (
Process.start("sth.exe","sth.sth");
) it works some times but some times when(I think) the path name have space within it ,it causes error like this (Process.start("wmplayer.exe","track 01.mp3");)
if I write this one (Process.start("wmplayer.exe","track01.mp3");) instead of the above one it works can any one explain it to me and a solution please.I had a problem like this once. Putting the file name in quotes helped:
Process.Start("wmplayer.exe","\"track 01.mp3\"");
Kristian Sixhoej
"Failure is not an option" - Gene Kranz
-
I had a problem like this once. Putting the file name in quotes helped:
Process.Start("wmplayer.exe","\"track 01.mp3\"");
Kristian Sixhoej
"Failure is not an option" - Gene Kranz