摘要:
使用代码操作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 阅读全文
摘要:
如何把.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 阅读全文