台式机自动开启数字小键盘,电脑自动开启数字小键盘的bat命令行

迅恒数据中心
echo 台式机自动开启数字小键盘
for /f "delims=" %%i in ('powershell -Command "Get-WmiObject -Class Win32_SystemEnclosure -Namespace 'root\CIMV2' | Select-Object -ExpandProperty ChassisTypes"') do set "ChassisTypes=%%i">nul
if "%ChassisTypes%"=="3"  goto Numpad
if "%ChassisTypes%"=="4"  goto Numpad
goto end
:Numpad
reg add "HKCU\Control Panel\Keyboard" /v "InitialKeyboardIndicators" /t REG_SZ /d 2 /f
:end
exit

分类:教程帮助 百度收录 必应收录