up

Setup.exe and BMG

Sometimes it is necessary for your application to require certain prerequisites before it can be installed. ClickOnce caters for this with prerequisite checking, including for a specific .net Framework. However, ClickOnce cannot install those prerequisites for you if they are missing. That's where setup.exe comes in.

Unfortunately ClickOnceMore cannot yet create a Setup.exe file, but you can integrate with one created by Visual Studio or the BMG. Here's how...

Create Setup.exe in Visual Studio

Visual Studio, as part of the Publish process, can create a Setup.exe file to bootstrap your application's ClickOnce installation. The idea is that the Setup.exe will be the file the users downloads and runs. Setup.exe installs the prerequisites and then launches the ClickOnce installation.

To create the Setup.exe as part of your Visual Studio project, go to the project properties for the application you are going to install. Go to the publish page and click on Prerequisites. Details of the options available can be found here: http://msdn.microsoft.com/en-us/library/7tx0bw8y.aspx

Ensure Setup.exe has correct filename and URL

One thing to make sure of with the Setup.exe that you create, is that it has the correct deployment manifest name. That is the .application file of your ClickOnce installation. It is possible to change some aspects of Setup.exe after it has been created, but its not possible to alter the actual filename of the .application file it will look for.

The URL on the otherhand, except for the filename, can be altered. You can change the information embedded in Setup.exe by running it from the command line:

You can change it. Using a command window, you can do this at command line in the same folder as the setup.exe:

* To show you the options: setup.exe -?

* To show you the stored URL: setup.exe -url

* To change the stored URL: setup.exe -url=

Add a link to your web page

Finally you just need to link to Setup.exe from your deployment web page. When uses click it they will download the setup.exe and run it. After it has installed prerequisites it will launch the .application file at the URL you have configured.

Create Setup.exe using Bootstrapper Manifest Generator

Another option for creating your setup.exe is to use the Bootstrapper Manifest Generator (BMG). The BMG is a tool for creating setup.exe files. You can find more information on the BMG here http://msdn.microsoft.com/en-us/library/ms165429.aspx.