【发布时间】:2012-02-07 18:28:17
【问题描述】:
我正在尝试执行一个包含以下内容的简单批处理文件..
ECHO OFF
::CMD will no longer show us what command it’s executing(cleaner)
ECHO As a network admin, I’m getting tired of having to type these commands in!
:: Print some text
IPCONFIG /ALL
:: Outputs tons of network information into the command prompt
PAUSE
:: Lets the user read the important network information
PING www.google.com
:: Ping google to figure out if we’ve got internet!
ECHO All done pinging Google.
::Print some text
PAUSE
但是,除了命令提示符一闪而过之外,什么也没有发生。 PAUSE 似乎没有任何效果。请帮忙。
【问题讨论】:
-
您能否确认您的脚本中的
IPCONFIG位实际上不是另一个批处理脚本,它恰好与IPCONFIG命令同名,并且您的脚本可以通过名称访问它? -
顺便说一句,您可以试试sysinternals bginfo - 适用于任何支持台的好工具
-
@AndriyM.. 我交叉检查了...没有其他批处理文件名为 IPCONFIG..
-
能否让脚本在
ipconfig之前暂停,看看是否是导致问题的原因。 -
如果你打开一个 CMD 提示符然后运行你的批处理文件会发生什么?
标签: windows-7 batch-file