Link to home
Start Free TrialLog in
Avatar of lapucca
lapucca

asked on

How do I register a file extension in the registry?

Hi, I have a C# Windows applicaiton that runs on Windows 2000 server or higher.  Users saves a couple of text file in my applicaiton that I give it a special file extension.  I would like to write a C# dll that would register this file extension (for example .abc) in the registry.  I would then use this dll in MSI installation's customer Action to execute after installation is completed.  Also, how do I indicate this file type to be "NoOpen" type unless it's done by my application using stream reader?  Thank you.
Avatar of SteveH_UK
SteveH_UK
Flag of United Kingdom of Great Britain and Northern Ireland image

Have a look at the source code here: http://www.mentalis.org/soft/class.qpx?id=5
But MSI installation in visual studio 2005 and 2008 offers a File Type Editor, that does just what you need, but it's done by the setup, so you don't need a dll and a custom action.


Hope this helps!

Regards,
Mishu
ASKER CERTIFIED SOLUTION
Avatar of Mihai Stancescu
Mihai Stancescu
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial