|
::從本體的skip=9行復(fù)制文本內(nèi)容到一個(gè)新文件run2.cmd
for /f "useback skip=9 tokens=* " %%a in ("%~f0") do (echo %%a>>run2.cmd)
::判斷循環(huán)執(zhí)行開(kāi)始
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
::判斷循環(huán)執(zhí)行結(jié)束
::改ip
set ipd="192.168.1.25" ::本機(jī)IP
set maskd="255.255.255.0" ::子網(wǎng)掩碼
set gated="192.168.1.1" ::網(wǎng)關(guān)
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
|
|