说明
- CMD查看MAC地址
ipconfig /all
- 注意保存起始MAC地址,也可以获取tmac软件查看
第一种方法推荐
编辑运行批处理
提示:
- 获取固定注册表分支项名请参阅:无线网卡mac地址修改
alterMacAddress.bat
@echo off
title 无线网卡MAC地址修改脚本
color 0A
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
if '%errorlevel%' NEQ '0' (
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
exit /B
:gotAdmin
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
@echo off
title 无线网卡MAC地址修改脚本
color 0A
echo ==============================================================
echo 修改无线网卡MAC地址
echo ==============================================================
echo 提示:
echo.
echo 有以下二个参数:
echo.
echo.
echo.一、固定注册表分支项名
echo.
echo.1.我的是0002,自行百度{4d36e972-e325-11ce-bfc1-08002be10318}
echo.
echo.
echo.二、随机MAC
echo.
echo.1.MAC为12个16进制数组成
echo.
echo.2.无线网卡MAC的第二个数必须为2、6、A、E中一个
echo.
echo.
set /p BranchID=Please Input your BranchID:
set /p newMAC=Please Input new MAC:
echo ==============================================================
echo 将MAC值写入注册表
echo.
echo.
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\%BranchID% /v NetworkAddress /t REG_SZ /d %newMAC% /f
echo.
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\%BranchID%\Ndi\params\NetworkAddress /v default /t REG_SZ /d %newMAC% /f
echo.
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\%BranchID%\Ndi\params\NetworkAddress /v LimitText /t REG_SZ /d 12 /f
echo.
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\%BranchID%\Ndi\params\NetworkAddress /v Optional /t REG_SZ /d 1 /f
echo.
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\%BranchID%\Ndi\params\NetworkAddress /v ParamDesc /t REG_SZ /d NetworkAddress /f
echo.
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\%BranchID%\Ndi\params\NetworkAddress /v type /t REG_SZ /d edit /f
echo.
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e972-e325-11ce-bfc1-08002be10318}\%BranchID%\Ndi\params\NetworkAddress /v UpperCase /t REG_SZ /d 1 /f
echo.
echo %BranchID%
echo.
echo 正在禁用本机网卡
netsh interface set interface name="WLAN" admin=DISABLED
echo.
echo 正在启用本机网卡
netsh interface set interface name="WLAN" admin=ENABLED
echo.
echo ==============================================================
echo.
pause
第二种方法
直接下载运行.exe
平台 | 下载地址 |
---|---|
云盘 |
https://pan.baidu.com/s/1OTw_uwe9STibffQOLYT1Zwfpsv
|
参阅:
更新中......
网友评论