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-09 12:05
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » -- How to modify the MAC address in p? View 1,499 Replies 7
Original Poster Posted 2008-03-04 12:40 ·  中国 湖北 武汉 教育网
中级用户
★★
Credits 313
Posts 162
Joined 2007-04-02 06:45
19-year member
UID 83693
Gender Male
Status Offline
-

How to modify the MAC address in p?

As the title!


-

[ Last edited by ooaf on 2008-3-4 at 12:42 PM ]
Floor 2 Posted 2008-03-04 13:51 ·  中国 广东 广州 天河区 电信
金牌会员
★★★★
一叶枝头,万树皆春
Credits 2,564
Posts 1,127
Joined 2006-12-25 22:57
19-year member
UID 74552
Gender Male
Status Offline
Only suitable for computers with only one network card installed


set /p mac=????
for /f "skip=1 delims=" %%i in ('WMIC NIC WHERE 'netconnectionid like "本地连接%%"' get caption') do set numnet=%%i
set regpath=HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\%numnet:~-4%
REG ADD "%regpath%" /v "MAC Address" /d "%mac%" /f
REG ADD "%regpath%\Ndi\Params\NetworkAddress" /ve /d "%%mac" /f
REG ADD "%regpath%\Ndi\Params\NetworkAddress" /v "ParamDesc" /d "MAC Address" /f
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
ooaf +2 2008-03-05 10:54
49206C6F766520796F752067757973 54656C3A3133383238343036373837
Floor 3 Posted 2008-03-04 14:26 ·  中国 福建 福州 联通
高级用户
★★
Credits 581
Posts 277
Joined 2006-12-23 05:10
19-year member
UID 74328
Gender Male
Status Offline
Also come in and learn.

everest79 said "Only suitable for computers with only one network card installed"

Does that mean that it can't be used on a computer using the GHOSTXP system?

Now hanging up, I'll test later if that's the case
Floor 4 Posted 2008-03-05 03:37 ·  中国 广东 广州 天河区 电信
金牌会员
★★★★
一叶枝头,万树皆春
Credits 2,564
Posts 1,127
Joined 2006-12-25 22:57
19-year member
UID 74552
Gender Male
Status Offline
For the XP system pre-installed by the enterprise, it depends on the internal settings. The standard operating network card information is deleted, so there is only one network card.

If there are several connections, you can directly modify the registry with the last three sentences.
49206C6F766520796F752067757973 54656C3A3133383238343036373837
Floor 5 Posted 2008-03-06 01:42 ·  中国 湖北 武汉 中国科学院武汉分院
银牌会员
★★★
Credits 1,187
Posts 555
Joined 2006-12-21 07:35
19-year member
UID 74129
Gender Male
Status Offline
It cannot be applied to the situation where there are multiple network cards on the machine!!

For example, for laptops, there are generally wireless network cards.
Floor 6 Posted 2008-03-06 02:50 ·  中国 广东 广州 天河区 电信
金牌会员
★★★★
一叶枝头,万树皆春
Credits 2,564
Posts 1,127
Joined 2006-12-25 22:57
19-year member
UID 74552
Gender Male
Status Offline
Wireless network cards are not counted. In my example, the WQL fuzzy query is "Local Area Connection%", so wireless connections are ignored
49206C6F766520796F752067757973 54656C3A3133383238343036373837
Floor 7 Posted 2008-03-06 13:40 ·  中国 广东 广州 荔湾区 电信
高级用户
★★★
潜水修练批处理
Credits 788
Posts 366
Joined 2006-12-31 02:43
19-year member
UID 75048
Gender Male
Status Offline
Using third-party tools may be better
http://www.yx127.com/tools/smac_1.0.rar
正在潜水修练的批处理小白
Floor 8 Posted 2008-08-10 04:27 ·  中国 湖北 武汉 电信
中级用户
★★
Credits 247
Posts 83
Joined 2005-09-12 12:06
20-year member
UID 42446
Gender Male
Status Offline
Does it need a reboot?
Forum Jump: