Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8851859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:15:35+00:00 2026-06-14T13:15:35+00:00

I’m trying to figure out the executable used to open files of a given

  • 0

I’m trying to figure out the executable used to open files of a given extension, so I can display that executable’s icon if the extension doesn’t have one.

I’m aware of the open verb in the HKEY_CLASSES_ROOT registry key for the file type, but I’ve found that it’s value is not always correct.

For example, I’m currently running Windows in Parallels on OS X. The default association of PDF files was Safari. I changed the default association, through explorer, to Adobe Reader. The open verb in the registry is still Safari, but when I double click a PDF file, it opens with Adobe Reader. Both the 32-bit and 64-bit registry have the same values.

Is there a better way to retrieve the association of a file type, either with .NET or winapi?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:15:36+00:00Added an answer on June 14, 2026 at 1:15 pm

    Your best bet is probably to use the Assoc* group of functions, such as AssocQueryKey() and AssocQueryString() via PInvoke. I don’t know, however, whether one of the many classes that come with the .NET framework in its many incarnations wraps this for you already. But the Shell API gives you an option to retrieve this information.

    Also note the remark section which states that the above functions are wrappers for the IQueryAssociations interface, which makes it even more likely you have another more straight route to what you want from within .NET.

    Old-style function was this one: FindExecutable(). Don’t use it, though. It uses the same flawed error code magic as ShellExecute().

    Also see the answers for Windows: List and Launch applications associated with an extension

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am trying to understand how to use SyndicationItem to display feed which is
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I'm trying to create an if statement in PHP that prevents a single post
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.