2011-09-17 30 views
3

推出榮我有這樣的代碼片段:問題從C#

void wing() 
{ 
    Process wing = new Process(); 
    wing.StartInfo.UseShellExecute = true; 
    wing.StartInfo.FileName = "C:\\Program Files\\Wing IDE 4.0\\bin\\wing.exe"; 
    wing.StartInfo.Arguments = "C:\\Documents and Settings\\User\\Desktop\\hello.py"; 
    wing.Start(); 
} 

每次時間我跑這個片段,我的程序確實打開翼的文件,但奇怪的是,在機翼文件的路徑是:C:\Documents and Settings\User\My Documents\Visual Studio 2010\Projects...。怎麼會這樣?此外,我看不到hello.py內的代碼。預先感謝任何幫助

回答

0

嘗試在文件名周圍加雙引號,即@「」「」+「C:\ ....您的文件」+ @「」「」