|  | 
| 这个题我会,因为当年就是这么搞网络克隆的, @echo off
 color 1f
 ::===================================================================================
 title 正在生成配置文件……
 
 @echo off
 echo  [计算机名]   [IP地址]         [Mac地址]         [内部网络号]        [CS-CDKey]   >配置文件.txt
 echo        WL-004        192.168.163.4        00-0B-2F-1B-6B-F2        00000004        0076904389094        >>配置文件.txt
 echo        WL-005        192.168.163.5        00-0B-2F-1C-0B-4D        00000005        0143005967914         >>配置文件.txt
 echo        WL-006        192.168.163.6        00-E0-4C-03-10-77        00000006        0186166087129         >>配置文件.txt
 echo        WL-007        192.168.163.7        00-0B-2F-1C-61-78        00000007        0203434253007        >>配置文件.txt
 echo        WL-008        192.168.163.8        00-0B-2F-1C-61-83        00000008        0232034542501        >>配置文件.txt
 echo        WL-009        192.168.163.9        00-E0-4C-8C-43-BD        00000009        0416231170064        >>配置文件.txt
 
 
 
 ::===================================================================================
 title 查找本机mac,以便确定本机机器名、ip地址、内部网络号、CS1.5序列号!
 
 @echo off
 if exist ipconfig.txt del ipconfig.txt
 ipconfig /all >ipconfig.txt
 if exist 本机Mac.txt del 本机Mac.txt
 find "Physical Address" ipconfig.txt >本机Mac.txt
 for /f "skip=2 tokens=12" %%M in (本机Mac.txt) do set strMac=%%M
 find "%strMac%" 配置文件.txt >本机配置.txt
 for /f "skip=2 tokens=1" %%N in (本机配置.txt) do set ComputerName=%%N
 for /f "skip=2 tokens=2" %%I in (本机配置.txt) do set IPAddress=%%I
 for /f "skip=2 tokens=4" %%V in (本机配置.txt) do set VirtualNetworkNumber=%%V
 for /f "skip=2 tokens=5" %%C in (本机配置.txt) do set strCdkey=%%C
 echo.
 echo.
 echo [计算机名]    [IP地址]        [内部网络号]        [CS-CDKey]
 echo %ComputerName%            %IPAddress%     %VirtualNetworkNumber%         %strCdkey%
 echo.
 echo.
 ::===================================================================================
 title 正在修改机器名、ip地址、内部网络号、CS1.5序列号……
 
 @echo off
 echo Windows Registry Editor Version 5.00>本机配置.reg
 echo.>>本机配置.reg
 echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName]>>本机配置.reg
 echo "ComputerName"="%ComputerName%">>本机配置.reg
 echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]>>本机配置.reg
 echo "NV Hostname"="%ComputerName%">>本机配置.reg
 echo "Hostname"="%ComputerName%">>本机配置.reg
 echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\NwlnkIpx\Parameters]>>本机配置.reg
 echo "VirtualNetworkNumber"=dword:%VirtualNetworkNumber%>>本机配置.reg
 echo [HKEY_CURRENT_USER\Software\Valve\CounterStrike\Settings]>>本机配置.reg
 echo "Key"="%strCdkey%">>本机配置.reg
 regedit /s 本机配置.reg
 
 netsh interface ip set address name="本地连接" source=static addr=%IPAddress% mask=255.255.255.0 gateway=192.168.163.254 gwmetric=1
 netsh interface ip set address name="本地连接" gateway=192.168.163.254 gwmetric=1
 netsh interface ip set dns name="本地连接" source=static addr=202.102.152.3 register=PRIMARY
 netsh interface ip add dns name="本地连接" addr=202.102.134.68 index=2
 netsh interface ip set wins name="本地连接" source=static addr=none
 ::===================================================================================
 title 重新启动计算机使设置生效!
 
 @echo off
 
 @echo off
 shutdown -r -t 20 -c "修改本机ip成功,20秒后自动重启!"
 del /s /q *.reg
 del /s /q *.txt
 del /s /q *.vbs
 cd /d %USERPROFILE%\
 del /s /q *.reg
 del /s /q *.txt
 del /s /q *.vbs
 del /s /q *.cmd
 del %0
 | 
 评分
查看全部评分
 |