代碼以下:spa
調用的命令:reg export exportPath registryKey -ycode
Process proc = new Process(); proc.StartInfo.FileName = "CMD.exe"; proc.StartInfo.Arguments = "/c reg export exportPath registryKey -y"; proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; proc.Start(); proc.WaitForExit();
結果就不會顯示任何窗口,而且不會有窗口一閃而過的狀況blog