2017-06-25 23 views
1

当编写一个批处理文件来改变我的IP地址设置为静态我创造了这个工作脚本,但现在它显示批处理文件没有按任意键继续

Changing IP address 
Waiting for "2" seconds and press any key to continue  
Changing Gateway  
Waiting for "2" seconds and press any key to continue 
Changing Subnet 
waiting for "2" seconds and press any key to continue 

方式我想让它显示是

Changing IP address  
Sits 2 seconds with no display of text 
Changing Gateway 
Sits 2 seconds with no display of text 
Changing subnet 
Sits 2 seconds with no display of text 

现在,我使用的超时命令

下面的代码片段

@ECHO IP Address Changed 
timeout 2 
@ECHO Subnet Changed..... 
timeout 2 
@ECHO Gateway Changed.... 
timeout 2 

任何人都知道如何与timeout命令或其他命令做..我只是在寻找它看起来像它的一次改变各区域1

回答

1

使用以下:

timeout /T 2 /NOBREAK > nul 

> nul零件将输出重定向到空设备,因此将其抑制。 /NOBREAK选项可防止等待时间被任何按键中断。

1

使用删除输出> NUL

timeout /t 10 > nul 
相关问题