优化开关机速度
发布时间:2020-12-14 02:35:07 所属栏目:Windows 来源:网络整理
导读:实现效果: 知识运用: 〔HungAppTimeout〕是關閉應用程式的等待時間 〔WaitToKillServiceTimeout〕是關閉windows服務的等待時間 实现代码: private void button1_Click(object sender,EventArgs e) { try { RegistryKey rk = Registry.CurrentUser.CreateS
实现效果: 知识运用: 〔WaitToKillServiceTimeout〕是關閉windows服務的等待時間 实现代码: private void button1_Click(object sender,EventArgs e) { try { RegistryKey rk = Registry.CurrentUser.CreateSubKey("Control PanelDesktop"); rk.SetValue("HungAppTimeout",400); rk.SetValue("WaitToKillAppTimeout",1000); Registry.SetValue(@"HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControl","HungAppTimeout",400); Registry.SetValue(@"HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControl","WaitToKillAppTimeout",1000); MessageBox.Show("优化已完成!从新启动后生效"); } catch (Exception) { MessageBox.Show("此程序不适用于你的操作系统"); } } (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
推荐文章
站长推荐
热点阅读