tags:

views:

51

answers:

1

I have created a viewer component which helps in viewing a file that is encrypted. I have created an installer which associates my custom extension(.abc) with the viewer application. Now, when I double click the file, the viewer app launches but the data doesn't get displayed. I know I have to write code to get this done. But I am not sure of how I can do this. I am using C#.

Thanks, Chandrasekhar

A: 

When you specify the path for your association, be sure to include %1 after it (for example,

C:\Program Files\yourApplicationPath %1

This will pass the path of the file being opened as a command-line argument to your application. You can then retrieve that in the main() function.

Adam Robinson