Results 1 to 3 of 3

Thread: Explorer file association

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2005
    Posts
    105

    Explorer file association

    Does anyone know how to associate a file type in windows explorer with a VB6 program, from within that program - for example like in WinRAR choosing which file types are associated with WinRAR.
    I presume that it would need registry editing - but the question is what to edit and how I would go about doing this.
    Also, related, is how I would get windows to add an option to run a VB6 program in the right click menu. This, I think, would be similar, but a different registry key.
    Can anyone help?

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Explorer file association

    Welcome to the forums

    I'm not sure if there is an API that automates this but to add a file association you need to add a key under HKEY_CLASSES_ROOT\.<extension> and make its default value the name of the file type. Then make another key under HKEY_CLASSES_ROOT with the name you just gave the file type, and all associated actions under \<keyname>\shell.

    For some examples just fire up regedt32 and have a browse through the HKEY_CLASSES_ROOT section. HTML files are good, just look at \.htm first and then \htmlfile to see how it works.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2005
    Posts
    105

    Re: Explorer file association

    Ok I'll try it, thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width