How to close window in System.Diagnostics.Process

Type following code for close window in System.Diagnostics.Process

System.Diagnostics.Process proces = new System.Diagnostics.Process();

proces.StartInfo.FileName = “iexplore.exe”;

proces .StartInfo.Arguments = “http://localhost/nwind/template/test.xml”;

proces .StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;

proces .Start();

Thread.Sleep(1000);

proces .Kill();

About the Author

avatar