🔴前言
笔记本使用外接键盘时,如果自带的键盘不禁用,电脑和键盘一起占用空间就会很大,这时把笔记本自带的键盘禁用掉,然后把机械键盘放在电脑上面,就会节省很多空间。
🔴正文
禁用代码如下:
@cd/d"%~dp0"&(cacls "%SystemDrive%\System Volume Information" >nul 2>nul)||(start "" mshta vbscript:CreateObject^("Shell.Application"^).ShellExecute^("%~nx0"," %*","","runas",1^)^(window.close^)&exit /b)
sc config i8042prt start= disabled
shutdown -r -t 0
复制以上代码,然后新建txt文件,复制粘贴进去,将扩展名txt改成bat,然后运行就可以
启用代码只需要将上面的 start= disabled 改成 start= auto 就可以,如下:
@cd/d"%~dp0"&(cacls "%SystemDrive%\System Volume Information" >nul 2>nul)||(start "" mshta vbscript:CreateObject^("Shell.Application"^).ShellExecute^("%~nx0"," %*","","runas",1^)^(window.close^)&exit /b)
sc config i8042prt start= auto
shutdown -r -t 0