问题启动/ wait命令 [英] Problem with the start /wait command

查看:121
本文介绍了问题启动/ wait命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

            @echo off
            start /wait notepad
            start worpad

这是code我已经写在一个批处理文件。我的目标是到记事本应用程序被关闭,停止该批处理文件执行。它的工作完美,但事实是,它显示命令提示符下也。其打开命令提示符当我执行

This is the code i have written in a batch file. My aim is to stop the batch file execution till the notepad application gets closed. Its working perfect but the thing is, Its displaying the command prompt also .Its opening the command prompt when i execute

     start /wait notepad in my batch file. 

当我关闭记事本在命令提示符下被关闭。但我不想prompt.How让我的那个命令。我甚至尝试了这些

The command prompt gets closed when i close my notepad. But i dont want the command prompt.How do i make that. I even tried these

    cmd /c start /wait notepad

即使上面的命令是行不通的。如何使it.How做我打开记事本只没有在命令提示符下,等到它是封闭的?

even the above command is not working. How do i make it.How do i open only notepad without the command prompt and wait till it is closed ?

推荐答案

正如我在回答<说href=\"http://stackoverflow.com/questions/6688738/why-does-it-open-command-prompt-when-i-excute-start-hurry-bat\">one你的previous问题,在命令提示符窗口是有,因为它的的工具,处理该批处理文件。命令提示符窗口是 CMD.EXE 程序的工作窗口,就像记事本的工作窗口是一个,你在编辑文本文件。通常情况下,运行具有隐藏其工作窗口的程序是一个简单的任务,除非该程序具有与隐藏窗口运行的一个$ P $对界定模式。碰巧的是, CMD 做的的有这样的模式。

As I said in my answer to one of your previous questions, the command prompt window is there because it is the tool that processes the batch file. The command prompt window is the working window of the CMD.EXE program, just like Notepad's working window is the one where you are editing text files. Typically, running a program with its working window hidden is a non-trivial task, unless the program has a pre-defined mode of running with the hidden window. As it happens, CMD does not have such a mode.

然而,有启动程序,其窗口的一个方式的最小的。你只需要创建一个快捷方式到你的程序(它可以是一个批处理文件也行),然后打开快捷方式的属性,在弹出的快捷选项卡上,设置运行属性最小化。为了更清楚,这里是一个例子:

However, there is a way of starting a program with its window minimised. You only need to create a shortcut to your program (it can be a batch file too), then open the shortcut's properties, and on the Shortcut tab, set the Run property to Minimized. To make it clearer, here's an illustration:

这篇关于问题启动/ wait命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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