Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Setting an application as Default for certain file types

Posted on 2003-03-27
5
Medium Priority
?
173 Views
Last Modified: 2013-11-20
Hi...
Would like to open certain file types mapped to my application so that double clicking on them will cause them to be opened in my application.
I was partially succesfull by making a entry in the Registry:
"HKEY_CLASSES_ROOT\.html\shell\open\command" where I had specified my applications path.

But when the user changes the default to some other application like IE and sets the option "Always Open With", then the above settings are over rided. Hope to find a quick response :))

Rgds,
Ravi


0
Comment
Question by:RAVID
2 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 800 total points
ID: 8217790
If user changed file associations there is nothing to do with this. CWinApp::RegisterShellFileTypes functions makes these associations, but it doesn't overwrite existing information:

If the registration database already associates a given filename extension with another file type, no new association is created (MSDN).

You can make necessary changes in Registry every time program is loaded (using Registry API), but I think this will not be user-friendly (Microsoft Word style: I know what you want better than you).
0
 
LVL 10

Expert Comment

by:jobrienct
ID: 9952777
in XP its control panel -> folder options -> File Types tab -> Add button.

type in the filename extension ie: A97
click ok. select the installed apllication to associate the file with from the list or use the browse button to find it. association should be immediate, no need to reboot.

John
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question