我如何最大限度地减少我的bat文件命令提示符 [英] How do I minimize the command prompt from my bat file

查看:162
本文介绍了我如何最大限度地减少我的bat文件命令提示符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这个bat文件,我想,当我运行最小化cmd窗口:

I have this bat file and I want to minimize the cmd window when I run it:

@echo off
cd /d C:\leads\ssh 
call C:\Ruby192\bin\setrbvars.bat
ruby C:\leads\ssh\put_leads.rb

基本上我想要的命令窗口立即最小化。如何做到这一点任何想法?

Basically I want the command window minimized immediately. Any ideas on how to do this?

推荐答案

使用启动命令,用 /分钟切换到最小化运行。例如:

Use the start command, with the /min switch to run minimized. For example:

start /min C:\Ruby192\bin\setrbvars.bat

既然您指定一个批处理文件作为参数,命令处理器运行时,通过了 / K 开关。这意味着,窗口将保持在屏幕上的命令已经完成之后。您可以通过显式运行的cmd.exe 自己,并通过适当的开关,如果有必要改变这种行为。

Since you've specified a batch file as the argument, the command processor is run, passing the /k switch. This means that the window will remain on screen after the command has finished. You can alter that behavior by explicitly running cmd.exe yourself and passing the appropriate switches if necessary.

另外,你可以创建一个快捷方式到批处理文件(PIF是文件仍然存在),然后改变其属性,以便它开始最小化。

Alternatively, you can create a shortcut to the batch file (are PIF files still around), and then alter its properties so that it starts minimized.

这篇关于我如何最大限度地减少我的bat文件命令提示符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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