Hi,
Got a problem detecting if Acrobat Reader is installed on a machine, would really appreciate your help.
I've got a PDF Report that I export to a directory then open it with Acrobat Reader. I need to check if the PC has Acrobat Reader installed before I open it...
I found this code but it's not working, i always get the messagebox even if the PC has the software installed.
The only other codes I could find online were JavaScript, i wanna do it in C#. I'm using WinForms!
Thanks!
Got a problem detecting if Acrobat Reader is installed on a machine, would really appreciate your help.
I've got a PDF Report that I export to a directory then open it with Acrobat Reader. I need to check if the PC has Acrobat Reader installed before I open it...
I found this code but it's not working, i always get the messagebox even if the PC has the software installed.
Code:
string RegPath = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; using (RegistryKey RegKey = Registry.LocalMachine.OpenSubKey(RegPath)) { foreach (string SW_Name in RegKey.GetSubKeyNames()) { if (SW_Name == "Acrobat Reader") { System.Diagnostics.Process.Start(@"C:\\...\\CK1_" + txtEntNo.Text + ".pdf"); } else { MessageBox.Show("You do NOT have Acrobat Reader installed on your machine...", "No Acrobat Reader"); } } }
Thanks!
Comment