摘要: 使用代码操作CMD命令行程序public void ExecuteCmd(string cmd){ Process p = new Process(); p.StartInfo.FileName = "cmd.exe"; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardInput = true; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.RedirectStandardError = true; p.StartInfo.Cre 阅读全文
posted @ 2011-04-12 21:11 JasNature 阅读(1285) 评论(5) 推荐(3) 编辑
摘要: 如何把.Net 程序加入到开机启动项中private void RegCompStartRun(bool cmd) { //获取程序执行路径.. string starupPath = Application.ExecutablePath; //表示Window注册表中项级节点,读取 Windows 注册表基项HKEY_LOCAL_MACHINE RegistryKey loca = Registry.LocalMachine; RegistryKey run = loca.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersio 阅读全文
posted @ 2011-04-12 21:02 JasNature 阅读(2191) 评论(1) 推荐(1) 编辑
我要赞个
我要评论
我要收藏