Question : 1 filetype for 2 executables

Hi,

I have a solution containing 2 projects (2 executables) and an installer project to install both projects at one time.
I set up everything as it should be and added a file extension to the File Type Editor in the installer project.
1 of the programs is an editor for the filetype, while the other runs the file.
So i made 2 "File Types", actually, 2 times the same extensions, but with a different command, the first pointing to the primary output of project 1 and the other to the primary output of project 2.

Both have a different action. First one has the Open action, and the second one has an Edit action (also changed the verb)
However, after installing, i do see both options on the file, but both point to the same executable, as if the second "file type" command did overwrite the first one.

Is there some way possible to have 2 commands in 1 File Type and 1 Installer?
Or 2 actions on a file type to different executables in a single installer?

I hope you are able to understand what i mean

Thx!

Answer : 1 filetype for 2 executables

No, it has to be not a dll but exe. You can't associate file extension with a dll.

> How would you advise to handle this?

This new exe takes command-line parameter

/open filename
 or
/edit filename

and calls the secondary exe, one of those two that you already have.

Or, instead of calling secondary, exe you might transfer your code for each exe into this new exe as subroutine, then there's only one exe.

Or, you change each of the two existing projects from exe to dll, and your new exe calls those dll's.

So, in each case there's new exe that takes parameter /edit or /open, and then calls either separate exe, or dll, or its own internal subroutine.



Random Solutions  
 
programming4us programming4us