摘要: 以重启为例子:Dos命令调用 private void SystemOperate(string strParameter, string strOver) { System.Diagnostics.Process P = new System.Diagnostics.Process(); P.StartInfo.FileName = "cmd.exe"; //设置参数 P.StartInfo.UseShellExecute = false; P.StartInfo... 阅读全文
posted @ 2013-05-06 15:12 luosuo 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 禁用 //禁用资源管理器 RegistryKey hk = Registry.LocalMachine; RegistryKey sub = hk.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon", true); sub.SetValue("Shell", "Explorer111.exe"); //禁用任务管理器 RegistryKey Huser = Registry.CurrentUser; ... 阅读全文
posted @ 2013-05-06 15:08 luosuo 阅读(772) 评论(0) 推荐(0) 编辑
摘要: 最近工作比较忙,没什么时间来博客 . 如今工作接近尾声, 现在总结一些以后需要用到的功能.产品在正式交付给客户之前需要交付一个试用版本,可以使用一百次.我想到的实现办法很简单,在注册表写如一个数据,每次使用数据就+1 . 代码如下:View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.Win32;namespace ConsoleApplication4{ class Program { static voi... 阅读全文
posted @ 2013-05-06 14:27 luosuo 阅读(438) 评论(1) 推荐(0) 编辑