2011-05-31 151 views

回答

6

像這樣:

Run("C:\LCR 12\stu.exe") 

希望這是你所追求的。

+0

作爲一個額外的,使用'的ShellExecute()'或'ShellExecuteWait()'時需要做/ syncronously。例如:ShellExecuteWait( 「C:\ LCR 12 \ stu.exe」)。 – erm3nda 2014-06-23 07:38:16

+0

@ erm3nda'運行()'和'RunWait()'分別作爲'的ShellExecute()'和'ShellExecuteWait()'使用程序當前用戶打開的文件,符號連接和協議的呼叫(包括超鏈接)註冊它。但是,你是對的;這兩種方法運行可執行文件。 – user4157124 2017-05-29 17:45:57

+0

@ erm3nda [相關(https://stackoverflow.com/a/39182061/4157124)。 – user4157124 2017-11-09 01:46:30

2

您可以使用如下變量做:

Local $exeLocation = "C:\LCR 12\stu.exe" 
Run($exeLocation)