China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 09:54
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Network card hardware ID View 790 Replies 4
Original Poster Posted 2010-05-02 22:45 ·  中国 四川 攀枝花 电信
初级用户
★★
Credits 147
Posts 131
Joined 2008-09-22 23:54
17-year member
UID 126352
Gender Male
Status Offline
Borrowing moderator HAT's code.
Address:http://www.cn-dos.net/forum/viewthread.php?tid=44988###
@echo off
rem Use a batch file to call devcon.exe to do this
echo Please enter your choice: (N to disable the network card, Y to enable)
set/p SELECT=
if /i %SELECT%==Y set SELECT=ENABLE&GOTO :DO
if /i %SELECT%==N set SELECT=DISABLE
:DO
for /f "tokens=2 delims=&" %%i in ('devcon find pci\* ^| findstr "Fast Ethernet"') do echo %%i
pause

Result: DEV_0191

But when using devcon restart enable disable, the hardware ID below also works. I don't know which one is actually the network card's complete hardware ID.
VEN_1039&DEV_0191

[ Last edited by rs369007 on 2010-5-3 at 12:36 ]
freedom!
Floor 2 Posted 2010-05-02 22:53 ·  中国 山西 临汾 电信
银牌会员
★★★
天的白色影子
Credits 2,343
Posts 636
Joined 2004-03-06 00:00
22-year member
UID 19350
Gender Male
Status Offline
VEN is the vendor code
DEV is the device code
The complete code is the combination of the two
But if you only want hardware of the corresponding type
and don't care about the vendor
then you can use DEV
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
rs369007 +1 2010-05-02 23:59
Floor 3 Posted 2010-05-03 00:00 ·  中国 四川 攀枝花 电信
初级用户
★★
Credits 147
Posts 131
Joined 2008-09-22 23:54
17-year member
UID 126352
Gender Male
Status Offline
I have to say thanks, and also say I'm impressed.
freedom!
Floor 4 Posted 2010-05-03 12:31 ·  中国 北京 大兴区 联通
银牌会员
★★★★
[b]看你妹啊[/b]
Credits 1,488
Posts 1,357
Joined 2006-05-20 12:00
20-year member
UID 55770
Status Offline
..., it's Lord HAT, okay? You even got a three-letter name wrong.

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
Floor 5 Posted 2010-05-03 12:37 ·  中国 四川 攀枝花 电信
初级用户
★★
Credits 147
Posts 131
Joined 2008-09-22 23:54
17-year member
UID 126352
Gender Male
Status Offline
Sorry, I've corrected it. Thanks for pointing it out.
freedom!
Forum Jump: