Process waitForExit() doesn't work
问题 I have the following code: Process p = new Process(); p.StartInfo.FileName = Path.GetDirectoryName(Application.ExecutablePath) + "\\unRAR.exe"; p.StartInfo.Arguments = @"e c:\appData.rar c:\folderek\"; p.Start(); p.WaitForExit(9000); I would like the window not to close after extracting files ( unRAR.exe extracts them). WaitForExit(9000) seems not to work. I read dozens of sites and still can't find any solution. 回答1: http://msdn.microsoft.com/en-us/library/fb4aw7b8.aspx reading this article