Additional details of Files?
-
Hi,
I have a file format for my application.
I want to associate it to my application such that any file with that extension is double clicked it should open my application & pass the path of file to the exe as a command line argument.
How do I do that?
Is it possible to achieve this independent of OS?
If yes then how will the OS know the path of exe that must be run for that extension?PS: Example when we double click a pdf file, it results in launching Adobe Reader & opening that pdf. How do I achieve similar functionality for my application?
-
this is very OS specific. For windows see this "KB article":http://support.microsoft.com/kb/307859.
If you want to register it on setup time (windows) you will need to alter the windows registry: see "this":http://social.msdn.microsoft.com/Forums/vstudio/en-US/630ed1d9-73f1-4cc0-bc84-04f29cffc13b/what-registry-keys-are-responsible-for-file-extension-association.
-
The links you gave me are for manually creating the associativity.
I want to create the associativity by code.Doesnt Qt have its way of doing this?
And what about other OS?
What do people normally do for achieving this associativity?
-
[quote author="CAD_coding" date="1372166293"]
The links you gave me are for manually creating the associativity.
I want to create the associativity by code.
[/quote]
The first one is, but not the second one! You can alter the windows registry by code. e.g. this is possible with QSettings.[quote author="CAD_coding" date="1372166293"]
Doesnt Qt have its way of doing this?
[/quote]
No... i doubt that.[quote author="CAD_coding" date="1372166293"]
And what about other OS?
[/quote]
i don't know...don't know how the exact mechanismn is on linux or mac platforms. Maybe someone else can help you out here?
But for sure there is a similar solution like for windows. -
Hi raven,
Thanks for your help!
Looks like I am on my own now...