标题: CMD一些素材 [打印本页]

作者: hujia    时间: 2015-2-18 01:02
标题: CMD一些素材
::从本体的skip=9行复制文本内容到一个新文件run2.cmd
for /f "useback skip=9 tokens=* " %%a in ("%~f0") do (echo %%a>>run2.cmd)

::判断循环执行开始
set /a mix=1
set /a max=1000
set /a temp=1
:go1
if %temp%==%max% goto go2
  set /a temp=%temp%+1

  echo %time%
  goto go1
:go2
::判断循环执行结束
::改ip
set ipd="192.168.1.25"      ::本机IP
set maskd="255.255.255.0"   ::子网掩码
set gated="192.168.1.1"     ::网关
set dns1=202.103.44.150     ::主DNS
set dns2=202.103.24.68      ::副DNS
netsh interface ip set address  source=static addr=%ipd% mask=%maskd% gateway=%gated% gwmetric=1
netsh interface ip set dns  source=static addr=%dns1% register=primary
netsh interface ip add dns  addr=%dns2% index=2







欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1