Deployment Problems

  • Thread starter Thread starter Kyriakos Stavrou
  • Start date Start date
K

Kyriakos Stavrou

I deployed my project and made a file association, let say that the
extension is .xyz Up to here all works fine. The problems i have are :



1. In the file types editor a verb named "open" is associated with the
action "Open". How can I write the verb "open" in the main program? Can you
please give me an example of an "open" verb.



2. How can I locate the path of the executable file that is invoked when a
file with the extension xyz (the extension of my program) is doubled
clicked?
 
Hello,

1. As far as I remember, you don't have to implement this verb in any
explicit way. What the shell actually does is launching your application
executable passing the opened file as a command line argument. Therefore,
what you should do is checking whether some arguments have been passed in
the command line and open the specified file if necessary.

2. I am not sure what do you mean here. As the file type association is
usually created upon setup, it is the setup routine's task to determine the
installation folder and tune the file association accordingly. When your
application is launched through the file association, you don't usually need
to know where the executable has been started from.
 
Thanks very match Dmitriy . It works just fine when reading the
Environment.CommandLine string

Dmitriy Lapshin said:
Hello,

1. As far as I remember, you don't have to implement this verb in any
explicit way. What the shell actually does is launching your application
executable passing the opened file as a command line argument. Therefore,
what you should do is checking whether some arguments have been passed in
the command line and open the specified file if necessary.

2. I am not sure what do you mean here. As the file type association is
usually created upon setup, it is the setup routine's task to determine the
installation folder and tune the file association accordingly. When your
application is launched through the file association, you don't usually need
to know where the executable has been started from.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Kyriakos Stavrou said:
I deployed my project and made a file association, let say that the
extension is .xyz Up to here all works fine. The problems i have are :



1. In the file types editor a verb named "open" is associated with the
action "Open". How can I write the verb "open" in the main program? Can you
please give me an example of an "open" verb.



2. How can I locate the path of the executable file that is invoked when a
file with the extension xyz (the extension of my program) is doubled
clicked?
 
Back
Top