bat 脚本通过传参控制多个wifi模拟多用户连接:
- 使用方式打开命令行:test.bat on TZA all 或者 test.bat off TZA all
@echo off
set input1=%1%
set input2=%2%
set input3=%3%
if %input1%==on (
echo turn on %input2% %input3%
if %input3%==all (
if %input2%==TZA (
for /l %%I in (1,1,7) do (netsh wlan connect name=W30S_WIFI_TEST_CONNECT_5G interface="TZA %%I")
)
if %input2%==TZB (
for /l %%I in (1,1,7) do (netsh wlan connect name=W30S_WIFI_TEST_CONNECT_5G interface="TZB %%I")
)
if %input2%==TZC (
for /l %%I in (1,1,7) do (netsh wlan connect name=W30S_WIFI_TEST_CONNECT_5G interface="TZC %%I")
)
if %input2%==TZD (
for /l %%I in (1,1,7) do (netsh wlan connect name=W30S_WIFI_TEST_CONNECT_5G interface="TZD %%I")
)
) else (
if %input2%==TZA (
netsh wlan connect