ClickOnce Helper

Run .NET ClickOnce applications from Firefox!

Author: James Dobson (dobson@softwarepunk.com)
Date: 2005-12-06
Version: 0.3 (documentation)

A Firefox Extension has been Created

Please go to http://www.softwarepunk.com/ffclickonce/ to download it.

It is now recommended that you use the extension, rather than ClickOnce Helper, as the extension will work with a wider variety of ClickOnce applications. The extension is also smaller and much easier to download.

If you are using a browser other than Firefox, then ClickOnce Helper may still be a good choice for you; continue reading.


UPDATE (2005-12-06)

It turns out that ClickOnce Helper will only work with ClickOnce applications that are configured to install to the local machine. If the application is configured so that it always runs from the web, then ClickOnce Helper won't work.

I have written a Firefox extension that solves this problem, and is a much better solution overall than ClickOnce Helper. Go to http://www.softwarepunk.com/ffclickonce/ to download it now.

Purpose

ClickOnce Helper lets you run .NET ClickOnce applications from Firefox.

ClickOnce applications are launched from a link to a ".application" file. When a user clicks on this kind of link, Firefox downloads the file to a temporary directory and runs it locally. This causes the ClickOnce launch process to fail.

This problem is documented on several websites:

Solution

ClickOnce Helper is a Firefox helper application. This means that when you use Firefox to click on a link to a ClickOnce file, ClickOnce Helper will be used to open that file. The following sections describe how to install ClickOnce Helper.

Choosing a Download

First, you must decide whether you will download the pre-built ClickOnce Helper application, or download the ClickOnce Helper source code and build it from scratch. If you're not familiar with building applications yourself, continue to the Installation section now.

ClickOnce Helper was written in Python 2.4 and is easy to build, so if you have Python 2.4 I suggest you build it yourself. You'll need:

Building it is easy:

  1. Unzip "source.zip" to a directory somewhere.
  2. Run "Build.bat".
  3. If everything worked, you'll find the "cohelper.exe" in the "dist" directory.

To install it, follow the instructions in the Installation section, without downloading cohelper.zip.

Installing the Pre-Built Application

Download and uncompress the archive at http://www.softwarepunk.com/cohelper/cohelper.zip (1840 KB). Make a folder called "COHelper" in your "Program Files" folder, and put the "cohelper.exe" file into this new folder.

Now, run Firefox and navigate to a site that has a ClickOnce application. Click on the link to the ".application" file. Firefox should bring up a window that asks you what you'd like to do with the file.

ffox-download.png

Select the "Open with" radio button, and choose "Other..." from the drop-down menu. Firefox now opens a dialog box. In this dialog box, navigate to your "Program Files" folder, open the "COHelper" folder, and select cohelper.exe. Press Open on the file chooser dialog box. Make sure that the "Do this automatically for files like this from now on." checkbox has a checkmark in it. Finally, press OK, and the ClickOnce application should open.

From this point on, all ClickOnce applications will run immediately when you click on their links.

Implementation Details

The source code is formatted for online viewing here.

The source code package may be downloaded at: http://www.softwarepunk.com/cohelper/source.zip

Will it Work for All Cases?

I don't know. The correct URL of the application has to be in the .application file, but so far it always seems to be...

If it doesn't work, email me a description of your problem and I'll do my best to help you out.

Security Implications

ClickOnce Helper runs applications downloaded from the internet, and does not do any special security checks. You should always be careful when running something that you downloaded from the internet.

Try not to click on any viruses, and everything will be fine.

Other Solutions

There is a different solution at http://channel9.msdn.com/ShowPost.aspx?PostID=138879. It is intended to be used by software developers when they are packaging their applications. ClickOnce Helper is a solution to be used by ClickOnce users, not ClickOnce developers. Probably, if I were developing some ClickOnce software, I'd use the solution at Channel 9, because it ensures that my software will work for users, regardless of whether or not they have ClickOnce Helper. Then again, I'd probably get lazy and just tell my users to come here...

License

This software is licensed under the "MIT License", available from: http://www.opensource.org/licenses/mit-license.php. Here is the text of the license:

Copyright (c) 2005 James Dobson

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.