file association
-
I was wondering how to create a file association in my app. So when the user double-clicks on a saved file (a file that was created using serialization), the program will execute and open the file. Also, how can a file icon association be created in the registry? I wasn't able to find to much on the web doing a search. Any help greatly appreciated. Brian :confused:
-
I was wondering how to create a file association in my app. So when the user double-clicks on a saved file (a file that was created using serialization), the program will execute and open the file. Also, how can a file icon association be created in the registry? I wasn't able to find to much on the web doing a search. Any help greatly appreciated. Brian :confused:
This need to be done as part of your setup routine, like an installation program. Visual Studio .NET has a deployment project that makes this very easy. Otherwise, read Creating a File Association[^] in the Platform SDK. Your setup routine should not hard-code the path to your executable. Using VS.NET's Windows Installer project you can associate your executable file with the extension so that the right path is used. In less "automated" setup environment you associate the executable's file path with the target application for that file extension. Just try it out. It's quite easy. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]