Re: How to get list of associated programs?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Thu, 15 Sep 2005 20:11:58 -0400, "Joseph Geretz"
<jgeretz@xxxxxxxxxx> wrote:

>When I right click on a jpg file and select Open With I get a list of all
>associated programs.
>
>Corel Photo Paint
>Windows Picture and Fax Viewer
>Paint
>Microsoft Office Picture Manager
>
>How do I get this list of associated applications for any given file?

Several choices here:
1) Dig it out of the registry. Tedious IMO, given the various possible
formats.

2) Have a look at these Api functions:
AssocQueryKey
AssocQueryString
AssocQueryStringByKey

Found some VB declares for them here:
http://www.vbbox.com/vb/codebox/Misc/?op=view&duid=ED4BC69B189146D69FD75909A828DB4C

3) The QueryAssociations interface. Unfortunately unlike "flat" Api
functions these C-style interfaces are not usable from VB without the
aid of a type library. There are plenty of shell Tlbs around, but I've
not seen one for QueryAssociations specifically. Perhaps you'll have
better Google luck than me :-)


-Tom
MVP - Visual Basic
(please post replies to the newsgroup)
.



Relevant Pages

  • How to get list of associated programs?
    ... When I right click on a jpg file and select Open With I get a list of all ... Corel Photo Paint ... Windows Picture and Fax Viewer ... Prev by Date: ...
    (microsoft.public.vb.winapi)
  • Re: Windows Picture and Fax Viewer
    ... > or jpg file automatically calls Windows Picture and Fax Viewer? ... and scroll down to Windows Picture and Fax ... Viewer and select it. ...
    (microsoft.public.windowsxp.general)
  • Re: Default Double-click action
    ... > I recently got a new machine running XP Home Edition SP2. ... > When double-clicking on a .JPG file, ... Highlight "Windows Picture and Fax Viewer" ... Digital Image Support Center ...
    (microsoft.public.windowsxp.photos)
  • Re: Folder Options control panel error message
    ... Right-click on the .jpg file and select: ... Open with> Windows Picture and Fax Viewer ... Windows XP - Shell/User ... Protect Your PC! ...
    (microsoft.public.windowsxp.general)
  • No images viewable from desktop
    ... Whenever I double-click on a .jpg file on the desktop, ... but Windows Picture and Fax Viewer fails to come up with the file ... Fax Viewer," a window comes up with "No preview available." ...
    (microsoft.public.windowsxp.general)