[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.sdk

Two questions about System.Diagnostics.Process.Start function

Robin Prosch via .NET 247

6/9/2004 5:17:00 AM

hi all,
It seems that the arguments of System=2EDiagnostics=2EProcess=2EStart()=
can only be the absolute path=2E The args can not be like=
"=2E\abc\efg=2Eexe" or "=2E=2E\abc\efg=2Eexe"=2E While i use relative path,=
the function doesn't work=2E Any solution??

The other question is=2E=2E=2E i take a example fisrt!
System=2EDiagnostics=2EProcess=2EStart("c:\\abc=2Eexe", "hello=2Etxt"); it=
works fine=2E BUT if the second arg replace with "hello=
world=2Eexe", something wrong! the function looks like=
System=2EDiagnostics=2EProcess=2EStart("c:\\abc=2Eexe", "hello=
world=2Etxt"); I think it is because the command will treat the=
"hello world=2Etxt" as two args "hello" and "world=2Etxt"=2E Is there=
other way to resolve this issue!??

Thanks

--------------------------------
From: ginee lee

-----------------------
Posted by a user from =2ENET 247 (http://www=2Edotnet247=2Ecom/)

<Id>qWL95HV380WP8lg3fCURrw=3D=3D</Id>
1 Answer

(Mattias Sjögren)

6/9/2004 10:29:00 AM

0


>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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.n... | http://www.dotneti...
Please reply only to the newsgroup.