1

I am searching a way to check with C#, if there is an open Adobe Acrobat Reader and when it is, get the filename with the path of the open PDF.

Can someone give me a tipp?

Thank you.

Best Regards, Thomas

BennoDual
  • 5,865
  • 15
  • 67
  • 153

2 Answers2

2

you can get this working with Process class.

Process[] acrobats = Process.GetProcessesByName("Acrord32");
foreach (Process p in acrobats)
{
    Console.WriteLine(p.MainWindowTitle);
}

Hope this gives a clue...

Veger
  • 37,240
  • 11
  • 105
  • 116
Rajan Panneer Selvam
  • 1,279
  • 10
  • 24
0

something close to your requirement

http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/a298349a-a59a-4c6e-ad42-bd9f0cf80fb0/

abmv
  • 7,042
  • 17
  • 62
  • 100
  • In the Window-Title there is only the filename - but I need the whole path of the file. – BennoDual Jan 20 '11 at 10:48
  • You need to dig deeper,have you ever looked at process explorer.It shows an exe and the files it has access too..so search for that way. – abmv Jan 20 '11 at 10:56
  • I know the process explorer - But to get the Filehandles, I have to write a driver :-( – BennoDual Jan 23 '11 at 16:14