By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,670 Members | 1,425 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,670 IT Pros & Developers. It's quick & easy.

Register file extension with custom exe

P: n/a
I have an exe console app that i wrote, which works on custom data files. I'd like to give these data files a custom extension and somehow register that file extension with my exe, so all i have to do is double click the data file and my exe will launch.

How do you register an exe with a file extension

Once this is done, and you double click the file with the file extension, how does the exe know which file was clicked? is the path passed into the exe as one of the args in the Main function

Thanks
Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

I have an exe console app that i wrote, which works on custom data files. I'd like to give these data files a custom extension and somehow register
that file extension with my exe, so all i have to do is double click the
data file and my exe will launch.

How do you register an exe with a file extension?

Once this is done, and you double click the file with the file extension,
how does the exe know which file was clicked? is the path passed into the
exe as one of the args in the Main function?

Thanks


Hi,

Indeed, the location of that file gets passed as one of the args in the
Main function.
Usually such kind of associations are done by the installation script.
Also, the user can associate a specific file type with an application. Of
course, you can implement the code to associate the file type by yourself:

For the begining I would suggest you to associate that file type manually,
by using the Explorer. This way you could inspect the parameters which get
passed to your application and the registry keys.

You can read more about the file associations here:
http://msdn.microsoft.com/library/en.../programmersgu
ide/shell_basics/shell_basics_extending/fileassociations/fileassoc.asp
Regards,
Adrian Vinca [MSFT], Developer Division
--------------------------------------------------------------------
This reply is provided "AS IS", without warranty (express or implied).

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.