以下代码需要保存文件名为 .bat 的文件,然后鼠标双击重启电脑之后生效,禁用键盘和触摸屏代码:
@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
启用键盘和触摸屏代码:
@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