capaho wrote:
I have an application that launches a PDF help file from the menu, but in Windows 7, FolderItem.Launch returns a FolderItem.LastErrorCode of 0 if no PDF reader is installed on the system. Any recommendations as to how to check for a default application for PDF files prior to launch if a failed launch under this condition doesn't return a valid error code?
This is what I have used, haven't checked it on Windows 7
Dim acrobatInstalled as Boolean
Dim r as RegistryItem
acrobatInstalled = true
#IF TargetWin32 THEN
Try
r = New RegistryItem("HKEY_CLASSES_ROOT\Software\Adobe\Acrobat\Exe", False)
Catch
'MsgBox "Failed to find Acrobat Reader."
acrobatInstalled = False
End Try
#ENDIF