![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-09 17:43 |
47,811 topics / 349,896 posts / today 1 new / 48,254 members |
| DOS批处理 & 脚本技术(批处理室) » [Solved] How to get the local connection name of a specified network card |
| Printable Version 1,467 / 2 |
| Floor1 mpl2005 | Posted 2007-09-20 16:38 |
| 初级用户 Posts 7 Credits 20 | |
|
Instructions:
Adding a new Microsoft Loopback Adapter loopback network card in the computer will add a new local connection. I originally wanted to configure a specified IP for this new connection, but because the name of the local connection generated by each computer is different, the netsh command cannot be used to wildcard the IP (the netsh command needs to specify the local connection name). For example: netsh interface ip set address name="Local Area Connection X" static 192.168.0.100 255.255.255.0 Difficulty: The name of the local connection of the newly added network card cannot be determined, but the network card is fixed: Microsoft Loopback Adapter Requirement: Be able to use the netsh command to specify an IP for the newly added network card I couldn't solve it by searching for information. I hope the experts can give guidance. I am very grateful~ [ Last edited by mpl2005 on 2007-9-20 at 09:57 PM ] |
|
| Floor2 mpl2005 | Posted 2007-09-20 21:59 |
| 初级用户 Posts 7 Credits 20 | |
|
Just now, I asked an expert in the forum, and the solution code is as follows:
FOR /F "tokens=2*" %%i IN ('ipconfig/all^|find /i "Ethernet adapter "') DO set name=%%j The variable name is But I don't understand it. Could any expert explain the detailed process? Only by knowing the reason can there be progress, right~ |
|
| Floor3 501367630 | Posted 2008-09-05 15:21 |
| 新手上路 Posts 1 Credits 2 | |
|
My computer's Local Area Connection is missing. I've looked at the above prompts. Can it really be retrieved?
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |