The /P switch allows you to set the value of a variable to a line of input entered by the user. Displays the specified promptString before reading the line of input. The promptString can be empty.
echo ┌──────────────────────────────────────┐
set/p= <nul&%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%%a%
echo 100%%
echo └──────────────────────────────────────┘
set b=
set a=■
set /a z=100
@echo [计算机名] [Mac地址] [IP地址] [IPX] [CDKey] 网关 DNS1 DNS2 DNS3 DNS4 >config.cfg
set /p getway= 请输入网关地址(必须):
set /p DNS1= 请输入DNS1地址(必须):
set /p DNS2= 请输入DNS2地址(必须):
set /p DNS3= 请输入DNS3地址(必须):
set /p DNS4= 请输入DNS4地址(必须):
If Exist ipconfig.txt Del ipconfig.txt
ipconfig /all >ipconfig.txt
If Exist phyaddr.txt Del phyaddr.txt
find "Host Name" ipconfig.txt >ComputerCfg.txt
For /f "skip=2 tokens=17" %%N In (ComputerCfg.txt) Do Set ComputerName=%%N
find "IP Address" ipconfig.txt >IPAddr.txt
For /f "skip=2 tokens=15" %%I In (IPAddr.txt) Do Set IP=%%I
find "Physical Address" ipconfig.txt >phyaddr.txt
For /f "skip=2 tokens=12" %%M In (phyaddr.txt) Do Set strMac=%%M
@Echo %IP% >ping.txt
For /f "delims=. tokens=1" %%M In (ping.txt) Do Set p1=%%M
For /f "delims=. tokens=2" %%M In (ping.txt) Do Set p2=%%M
For /f "delims=. tokens=3" %%M In (ping.txt) Do Set p3=%%M
set /a ipscan=0
goto panduan
:panduan
cls
set a=%a%■
set /a b=%ipscan%*100/254
set /a z=%ipscan%*100/254
@echo 完成进度 %z%%%
:star
nbtstat -a %p1%.%p2%.%p3%.%ipscan% >c1.txt
For /f "skip=2 tokens=4" %%X In (c1.txt) Do Set p5=%%X
find "UNIQUE" c1.txt >c2.txt
For /f "skip=2 tokens=1" %%N In (c2.txt) Do Set p6=%%N
@echo %p6% %p5% %p1%.%p2%.%p3%.%ipscan% %ipscan% 请填写CS-CDKEY %getway% %DNS2% %DNS3% %DNS4% %DNS1%>>config.cfg
goto panduan