I have an application which uses ShellExecute(hWnd,"open",pFile,NULL,NULL,SW_SHOWMAXIMIZED ); to display attachments. The pFile can be any type of document including PDF. On a Vista machine with Adobe Reader (8,9, or 10) in the User's Temporary directory it does not work for PDF documents. When I right click the PDF document the Default Verb is "Read" not "Open". (If I replace the "open" in my call to "read" it works, but I can't do that is it can be an arbitrary attachment).
Looking in the Registry for the Shell verbs only "open" is entered. If I use "Open With" to set the default program to "Notepad" it opens the files in notepad. If I change it back to Adobe it goes back to "read".
I did not set this machine up and there could be some "interesting" permissions, security settings, but would these cause Adobe Reader to change the verb to "read" from "open"? (And if so, how do I remove the settings?). I am also running as administrator with full read/write access to the directory?
I trawled the Internet and could only find one other person with this problem, but no solution...
Only the Reader is installed. A the moment it is the one of 16 machines not working. It was installed by the previous SYSADMIN. It is in a domain and I am thinking permissions but I can't start playing around with them without a pointer as to this being the problem.
*** One more thing ***
It seems that a local user and the local administrator have the correct context menu (Open with Adobe 8/9/x) while the domain administrator seems to have the Context Menu of READ. Note that the domain administrator on other PCs is correct and I can't find any Group Policies etc. which are different.
Any new results on this issue?
We could resolve what seems to be the same probleme by fixing the registry.
We had a domain user on a machine (Win 7/64bit) with only a "Read" entry in the context menu for pdf files.
Using ShellExecute('open'...) in a similar use case we had the same result as ceeebeem.
Adober Read X is installed on all of our machines.
Other users - especially a "fresh" user - on the same machine haven't got this problem.
We started regedit for the specific user and found
HKCR\.pdf\(standard) = pdf_auto_file
Other users had:
HKCR\.pdf\(standard) = AcroExch.Document
The entries and subtrees under:
were identical for all users.
Reinstall or Repair the Acrobat Reader X did not solve the problem.
Also reassign the extension by "Open with..." did not work.
But deleting the "HKCR\.pdf" entrie for the specific user did the job.
After a registry refresh the .pdf-entry reappeard for this user as:
HKCR\.pdf\(standard) = AcroExch.Document.
So this seems to be a problem of registry virtualisation.
(May be another program with not enough access right has produced this virtual HKCR\.pdf entry.
In our case the Foxit Reader was priviously installed (and later removed) on this machine. But this is just a guess.)
Hm maybe editing HKCR was not a goog idea because according to http://support.microsoft.com/kb/256986/en HKCR is build from HKCU\Software\Classes and HKLM\Software\Classes. So values should be edited there...
But problem stays resolved, may ba as a side effect.
Europe, Middle East and Africa