Shellexecute won't open a pdf on Vista

Language: VB6

We have a VB6 program installed in several thousand users in all versions of Windows. On all but one Vista machine the rutine works fine. The user had Adobe Acrobat 6 installed and then installed Adobe Acrobat 9. Double clicking on the file will open it in Acrobat 9. Shellexecute returns no error, so apparently it is working, it's just that nothing is opened.

This is the rutine. By the way, the same rutine is used for other types of files, and these all work.

Function ShellExe(FileName As String, sPath As String) As Long
Dim fff As Integer
Dim Scr_hDC As Long
Scr_hDC = GetDesktopWindow()
ShellExe = ShellExecute(Scr_hDC, "Open", FileName, "", sPath, 1)
If ShellExe = 2 Then
    fff = FreeFile
    Open sPath & "\" & FileName For Binary As fff
    Close fff
    ShellExe = ShellExecute(Scr_hDC, "Open", FileName, "", sPath, 1)
End If
End Function

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Does ShellExe/ShellExecute return a value greater than 32?

I'm not sure whether this is related - but is the contents of this registry key the same on working and the non-working machine?

Gary_NelsonAuthor Commented:
We were able to solve the problem by uninstalling Acrobat, manually removing the keys from the registry and reinstalling Acrobat.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gary_NelsonAuthor Commented:
The problem only ocurred in one machine and we were able to solve it by uninstalling Acrobat, removing the Acrobat keys from the registry and reinstalling Acrobat.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.