hi all,
It seems that the arguments of System.Diagnostics.Process.Start() can only be the absolute path. The args can not be like ".\abc\efg.exe" or "..\abc\efg.exe". While i use relative path, the function doesn't work. Any solution??
The other question is... i take a example fisrt!
System.Diagnostics.Process.Start("c:\\abc.exe", "hello.txt"); it works fine. BUT if the second arg replace with "hello world.exe", something wrong! the function looks like System.Diagnostics.Process.Start("c:\\abc.exe", "hello world.txt"); I think it is because the command will treat the "hello world.txt" as two args "hello" and "world.txt". Is there other way to resolve this issue!??
Thanks
Mattias Sj?gren - 09 Jun 2004 09:29 GMT
>While i use relative path, the function doesn't work. Any solution??
What's the path relative to?
>Is there other way to resolve this issue!??
Try wrapping it in double quotes, "\"hello world.txt\""
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.