c++禁用笔记本自带键盘

#include
using namespace std;
int main()
{
	int buffer;
	cout << "禁用请按1,启用请按2:";
	cin >> buffer;
	if (buffer == 1)
		system("sc config i8042prt start= disabled  ");
	else if (buffer == 2)
		system("sc config i8042prt start= auto  ");
	cout << "是否重启?1重启 2暂时不:";
	cin >> buffer;
	if (buffer == 1)
		system("shutdown -r -t 1");
	system("pause");
	return 0;

}


你可能感兴趣的:(c++禁用笔记本自带键盘)