The following 2 lines open a text file in notepad and then close notepad:
System.Diagnostics.Process pr =
System.Diagnostics.Process.Start("c:\\windows\\sys tem32\\notepad.exe","c:\\x.txt");
pr.CloseMainWindow();
But, the following 2 lines open a pdf file in the Acrobat reader, which
remains open:
System.Diagnostics.Process pr =
System.Diagnostics.Process.Start("c:\\program files\\adobe\\acrobat
6.0\\reader\\acrord32.exe",@"/t ""c:\exportfiles\d.pdf"" ""HP LaserJet 3300
Series PCL 6"" ""HP LaserJet 3300 Series PCL 6"" ""DOT4_001""");
pr.CloseMainWindow();
How can I close the Acrobat reader?
"Shiva" wrote:
Process.Start() returns a Process instance. Call CloseMainWindow() or Kill()
on the returned instance.
"mg" <mg@discussions.microsoft.com> wrote in message
news:8F**********************************@microsof t.com...
System.Diagnostics.Process.Start("c:\\windows\\sys tem32\\notepad.exe","c:\\x
..txt");
Will launch x.txt in notepad
What code will close this instance of notepad?