- @echo off
- set "v_reg=HKLM\SYSTEM\ControlSet001\Services\NetBT\Parameters"
- for /f "tokens=3" %%a in ('reg query %v_reg%^|find /i "EnableLMHOSTS"') do (
- if "%%a"=="0x1" (set d=0x0) else set d=0x1
- )
- reg add %v_reg% /v EnableLMHOSTS /t reg_dword /d %d% /f
- pause
复制代码 XP下测试成功 |