Can I set a ClickOnce application as the default program to open a filetype on a PC
Solution 1:
This really depends on the installed ClickOnce software, but the short answer is probably not.
If the software makers didn't integrate this type of functionality into the application as a setting, finding the executable and associating it with the file type may still fail because they probably didn't design their application to start with a file passed in as a "file open" parameter.
However, if you want to try, you can search for the executable in one of the following directories. Note, these are part of the ClickOnce cache. The cache is a bit obfuscated, so investigation will be necessary.
Windows XP
C:\Documents and Settings\[Username]\Local Settings\Apps\2.0\[Random Folder Name]\[Another Random Folder Name]\[Hunt until you find it.]\the-apps-executable.exe
Windows Vista+
C:\Users\[Username]\AppData\Local\Apps\2.0\[Random Folder Name]\[Another Random Folder Name]\[Hunt until you find it.]\the-apps-executable.exe
The philosophy behind ClickOnce is a bit different to normal programs installed in "C:\Program Files". By installing the application in the user's directory, the application can be installed without having admin rights and the automatic updating system can work without having any awful security issues.
ClickOnce is really just an installation mechanism for software. I manage a very robust application that I publish through ClickOnce because I need to have the ability to force updates to my user's. As far as limitations are concerned, the software only has guaranteed access to a few folders within the user's working folder for data storage.
ClickOnce applications are not restricted in any way by the C1 engine in regards to what they are and aren't allowed to do. They are only restricted by the user's rights. If you have control of the end-user's system, you can do whatever you want with a C1 application. If you are developing for a wider range of users, in different environments, then you need to develop your application with the assumption that you are running in a limited sandbox.
The developer, Evan Wondrasek, says that by default:
MarkdownPad (should) associate itself with .md, .mdown, and .markdown filetypes. You can manually associate filetypes with the MarkdownPad executable (it handles both ClickOnce and standard Windows args), but there is one major caveat when manually associating filetypes to the executable: When using the executable directly, the application will NOT be running in "ClickOnce mode" and will no longer receive automatic updates. You can verify this by going to Help -> About and "Not Deployed via ClickOnce" will be listed next to the version number.