MainBoss Advanced, Version 3.4.0:
Updating an Existing ClickOnce Installation
Before attempting ClickOnce deployment, make sure you have read the appropriate sections of the MainBoss Installation and Administration Guide.
ClickOnce is simple to use but complicated to set up.
It requires an IT department with a high degree of technical sophistication.
Microsoft provides a good deal of information about ClickOnce at http://msdn.microsoft.com/library/wh45kb66.aspx.
Note that this web page is for people who have installed an earlier version of ClickOnce installed. If you are installing ClickOnce for the first time, click here for instructions.
ClickOnce users go to a web page to access ClickOnce. Typically, you will have a customized web page for this purpose. You may be able to re-use your existing web page with this new version of ClickOnce. However, you may have to make changes; see the Existing Web Pages section below.
If you don't remember where your ClickOnce directory is: Start your IIS manager (by running inetmgr using "Run" in the Windows Start Menu). In the left hand panel, keep expanding entries until you find the one for the web site that your ClickOnce uses. Right-click on the entry for that site and click either "Explore" or "Properties" (different versions of IIS manager have different menu entries). The resulting information will tell you where your current ClickOnce directory is.
Installing the new ClickOnce software:
- Move the contents of your existing ClickOnce directory to some (temporary) holding directory.
- Click here to obtain a ZIP file named Install.ClickOnce.22.214.171.124.zip containing the files you need for ClickOnce deployment.
- Extract the contents of the ZIP file into your existing MainBoss ClickOnce directory.
- Copy your old web page file (typically an HTML file) from the holding directory back to the ClickOnce directory.
Once you are satisfied that ClickOnce is working, you can delete the holding directory that contains your old ClickOnce files.
Earlier versions of MainBoss Advanced implemented ClickOnce using two executable programs:
- setup.exe would install the prerequisites on a user's computer
- mainboss.application would execute MainBoss itself
This version of MainBoss does not use setup.exe. Instead, we simply require that the prerequisite software be installed in some other way. If you have an existing web page for executing ClickOnce, you should edit it to remove any references to setup.exe. The only link you need is to mainboss.application.
Once you have changed your existing web page file to remove references to setup.exe, you can copy your old web page to the MainBoss ClickOnce directory and use it as before.
In order to run MainBoss Advanced using ClickOnce, the following software must be installed on the user's system:
- Windows Installer 3.1
- .NET Framework 4
- Microsoft Report Viewer 2010
If a user attempts to run MainBoss through the ClickOnce web page without having the appropriate prerequisites, MainBoss will display the message "System update required".
There are two ways to ensure that user systems have the prerequisite software. You could simply install the software by hand on any system where someone will be running MainBoss. However, this can only be done by someone with Windows Administrator privileges. Alternatively, you could use Windows Server Manager to activage Windows Server Update Services. To do so, start Windows Server Manager on your Windows Server system and use "Add Role" to add the role "Windows Server Update Services".
Once you add this role, you can update other Windows systems on the network using the normal Windows Update software (provided you have Windows Administrator privileges on the network server computer). In particular, you can add the prerequisite packages (listed above) to any computer you choose.
Caveats about ClickOnce
If several people use ClickOnce to run MainBoss on the same computer, the MainBoss software will be installed once for each such user. For example, if three people use the same computer at different times and all of them run MainBoss, the MainBoss software will be installed separately for each person.
People who invoke MainBoss through ClickOnce will not be able to specify command line arguments to the MainBoss software. They will also not be able to run the MBUtility program.
Changing the ClickOnce Location
When installing a new version of ClickOnce, you may decide that it's a good time to change the software's location. If so, make sure you tell your users to start ClickOnce at least once through the web page rather than just using the entries in their Start menus.
Why? Because if users start ClickOnce through their Start menus, Windows looks for the software in the known location. If the software can't be found (because it's been moved), Windows just uses the local version of MainBoss without issuing a message. This local version will be the old version of MainBoss, and will continue to be the old one until the user, at least once, executes the software through the web page and obtains the new software.
Note that this is only a problem if you move the software location. If you install a new version of MainBoss in the same location as the old one, Windows will look at that location, see that there's a new version, and install it on the user's computer.