批处理添加IPX协议

经常有些游戏需要安装IPX的协议,每次都要手动安装很麻烦,这里提供以下批处理代码

将下面的代码保存为 *.bat,如1.bat

@echo off
ipconfig /all | find /I "IP Address">IP_.txt
for /f "tokens=15" %%M in (IP_.txt) do set IP=%%M
echo REGEDIT4 >reg.reg
echo [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\NwlnkIpx\Parameters] >>reg.reg
echo "VirtualNetworkNumber"=dword:00000%IP:~10% >>reg.reg
regedit /s reg.reg
del IP_.txt
del reg.reg
exit

单网卡改内部网络号
@for /f "tokens=16 delims=." %%i in ('ipconfig^|find /i "ip Address"') do reg add HKLM\SYSTEM\CurrentControlSet\Services\NwlnkIpx\Parameters /v VirtualNetworkNumber /t reg_dword /d %%i /f

根据时间改内部网络号(毫秒)
@reg add HKLM\SYSTEM\CurrentControlSet\Services\NwlnkIpx\Parameters /v VirtualNetworkNumber /t reg_dword /d %time:~6,2%%time:~-2% /f

This entry was posted in Technology and tagged , . Bookmark the permalink. 4,209 views

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *