目前,我列出了所有网络适配器,然后用户需要键入适配器的名称才能继续执行其余代码。
:: Listing all network adapters
echo/List all network adapters & netsh interface show interface
:: Getting the name of the network adapters and validating the user input
echo/ & set /p "_adapterName=Enter the interface name you want to fix: " || =;(
echo You must enter a network adapter name! & exit /b );=
相反,我将如何使用该列表以便用户可以按编号从中选择项目?