如何在不打开新 cmd 窗口的情况下从命令行启动程序? [英] How do I launch a program from command line without opening a new cmd window?

查看:59
本文介绍了如何在不打开新 cmd 窗口的情况下从命令行启动程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用以下命令以编程方式从 cmd 执行外部文件:

I'm trying to programmatically execute an external file from cmd using this command:

START "filepath"

其中 "filepath" 是我的文件路径.它打开正常,但也会打开一个新的命令提示符窗口.

Where "filepath" is the path of my file. It opens fine but it also open a new command prompt window.

那么,在不打开新窗口的情况下打开外部程序的正确命令是什么?

So, which is the right command for opening an external program without opening a new window?

推荐答案

在 Windows 7+ 中,第一个引号将是 cmd 窗口的标题以打开程序:

In Windows 7+ the first quotations will be the title to the cmd window to open the program:

start "title" "C:pathprogram.exe"

像上面那样格式化您的命令将暂时打开一个 cmd 窗口,该窗口随着出现的速度而消失,因此您真的永远不会看到它.它还允许您打开多个程序而无需等待第一个先关闭.

Formatting your command like the above will temporarily open a cmd window that goes away as fast as it comes up so you really never see it. It also allows you to open more than one program without waiting for the first one to close first.

这篇关于如何在不打开新 cmd 窗口的情况下从命令行启动程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆