I don't know if you've seen that batch script online that automatically changes the IP after ghosting. Because that batch script has a really critical flaw, which is that it can only change the first network card, which is (Local Area Connection). If you ghost it over, and the network card of that computer is not the same model, or it's not in the same IPC slot, then there will be (Local Area Connection 2) or (Local Area Connection 3). I myself have tried using find to extract it, and every time I need it, there's an extra :. I don't know what to do.
=================================
ipconfig /all >ipconfig.txt
find "Ethernet adapter" ipconfig.txt >connect.txt
for /f "skip=2 tokens=3" %%c in (connect.txt) do set connect=%%c
=============================================
This is the connect.txt I got
=============================================
---------- IPCONFIG.TXT
Ethernet adapter 本地连接 2:
=============================================
I don't know how to get (Local Area Connection 2)
Is there any other way to get it? What I get all have (Local Area Connection 2:) and an extra dot added
PS. Sorry moderator, I didn't read the forum rules clearly just now. I'm a newbie, I need to understand the role of for before speaking
But now I really want to know, I'm learning ^^
[ Last edited by jzl168 on 2006-8-17 at 22:43 ]
=================================
ipconfig /all >ipconfig.txt
find "Ethernet adapter" ipconfig.txt >connect.txt
for /f "skip=2 tokens=3" %%c in (connect.txt) do set connect=%%c
=============================================
This is the connect.txt I got
=============================================
---------- IPCONFIG.TXT
Ethernet adapter 本地连接 2:
=============================================
I don't know how to get (Local Area Connection 2)
Is there any other way to get it? What I get all have (Local Area Connection 2:) and an extra dot added
PS. Sorry moderator, I didn't read the forum rules clearly just now. I'm a newbie, I need to understand the role of for before speaking
But now I really want to know, I'm learning ^^
[ Last edited by jzl168 on 2006-8-17 at 22:43 ]

