2015-06-20 49 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. 
相关问题