2015-06-20 46 views
0

這是我試圖從命令行啓動程序(明星後衛) enter image description here如何從命令行啓動該程序?

我在此目錄中打開一個新的命令提示符的過程,我試圖啓動命令行(這樣我就可以了明星後衛的應用稍後傳入命令行參數)。

然而,當我這樣做,我並沒有最終啓動程序,但我最終在同一目錄中啓動一個新的命令提示符進程(輸出如下所示)當我正常啓動它時,程序啓動正常GUI點擊) enter image description here

有誰知道這個問題是什麼?我首先在Windows中執行了ls(OSx)equivalent,以確保我擁有可執行文件的正確文件路徑。然後,我使用start命令與enclosing引號中的可執行文件路徑一起啓動程序,以考慮空間。

+0

這逗號看起來很奇怪,你嘗試從命令行執行「Star Guard.exe」? –

回答

1

start命令的語法是獨一無二的,更不用說愚蠢了。如果第一個參數在引號中,則它被解釋爲窗口標題。

在這種情況下,你實際上並不需要使用start可言,你可以只說

"Star Guard" 

"Star Guard.exe" 

如果你想使用start,也許是因爲你想要要爲GUI應用程序指定/wait,或者因爲要在新窗口中啓動控制檯應用程序,則必須包含標題參數:

start "" "Star Guard.exe" 

(title參數並不需要實際指定標題,它只是需要存在。)

+0

這回溯到1987年的['OS/2 cmd.exe開始](http://www.robvanderwoude.com/os2start.php)。但是,在OS/2'start'有一個'/ PGM'選項強制解釋帶引號的字符串作爲命令而不是標題。 – eryksun

1

從OS/2 Warp的幫助

Starts an OS/2 program in another session. 

The primary use for START is to automatically start programs at system startup. The 
special batch file, STARTUP.CMD, allows you to do this. 

To imbed redirectional signals into the command session, enclose the command and 
command inputs in quotation marks. 

START 
      "program   /K  /F 
      title"   /C  /B 
          /N 


      /PGM   /FS   /MAX 
          /WIN  /MIN 
          /PM 
          /DOS 

    command 
      /I       command 
             inputs 






Related Commands: RUN 

Enter this command without a parameter to start an OS/2 command processor. 

If you use the /WIN, /FS, or /PM parameter, your program runs in the foreground session. 
If you do not use one of these parameters, you can use the /F parameter to make the 
program run in the foreground session. 

Make sure that you specify the correct drive and path when you use the START command to 
run a batch file with the STARTUP.CMD file. Also, if you plan to redirect I/O using the 
START command, enclose the command and command inputs within quotation marks. 

You can use START to run full-screen applications or applications running in a window 
such as Presentation Manager programs. 

START determines the type of application and will run it in the appropriate window or 
full-screen session. However, you have the option to override the determined default by 
using the /FS, /WIN, /PM, or /I parameter. 

You cannot start a batch file (.CMD) with the /PM parameter. 
相關問題