I have successfully developed and deployed a ClickOnce application which registers an associated file extension, for instance *.abc. When I click on a file named x.abc or if I type x.abc from the command prompt, the ClickOnce application starts and I can retrieve the file through the dedicated API. I can also launch the application programmatically with the following code:
System.Diagnostics.Process.Start ("x.abc");
Everything works fine on my Vista x64 box.
However, if I try to do exactly the same thing on a Windows 7 (also x64), I have a very strange problem. Here is what I observe:
- Manual start of x.abc by double-clicking it from the Explorer works.
- Manual start of x.abc from the command prompt works.
- Process.Start("x.abc") does not start the application; however, the process object returned shows that there was not error and that the ClickOnce application somehow exited immediately. But even a Trace at the very beginning of the ClickOnce application is never reached.
- Stranger yet, Process.Start("x.bat") with a file x.bat containing the single line x.abc does not start the ClickOnce application either! Same x.bat started from the Explorer works (of course).