Deploying the Software Update Wizard

As discussed in the Software Update Wizard architecture page, you can deploy the Software Update Wizard as a Windows Service, or as a standard Windows executable.

Both implementations have the same functionality, with the exception that when the Software Update Wizard runs as a Service it runs in the SYSTEM security context, and therefore has rights equivalent to Administrator rights to update any files on the host computer, even files which the logged on user does not have rights to change.  For 'modern' operating systems like XP, Vista or Windows 7 the service implementation should be the preferred option as it allows you to securely deploy the full range of Software Update Wizard features for a negligible memory overhead and virtually zero cpu utilization (except during the actual update process itself).

(Note that Windows 98ME does not support running Windows services, so if you still need to support Windows 98ME you will be forced to use application mode for the Software Update Wizard.  See here for a Windows 98ME strategy.)

The easiest deployment option - use our supplied redistributable installer, wuwinstaller.exe

Installing using wuwinstaller.exe:

The easiest way to deploy the Software Update Wizard is with the supplied wuwinstaller.exe, which is located in the 'SoftwareUpdateWizard' folder under 'Program Files on your computer.

You can launch this installer from within your own application installer.  You can force it to run silently (i.e. with no user interface) by passing the text "/S" as a command line argument, as in:

wuwinstaller.exe /S

Note that the "S" must be upper case.

There are two additional command line options you can use:

-NoInstall 1 Tells the installer not to install the service application into the services database in Windows using the SYSTEM identity default.  This option is described in more detail below.
-HideUninstall 1 Tells the installer not to add uninstall information to the Windows 'Add/Remove Programs' control panel applet.  Note that the uninstaller executable will still be installed, and must be called by your uninstaller as described here.


If you use wuwinstaller.exe to deploy the Software Update Wizard then the only other installation responsibility you have is to install the Software Update Wizard licence file, WebUpdateSvc4.lic, into the same folder as your application.  The developer installer will have installed WebUpdateSvc4.lic into the 'SoftwareUpdateWizard' folder within your 'Program Files'.

More..

Uninstalling using wuwinstaller.exe

To uninstall the core components on a client machine your uninstaller should call 'wuwuninst.exe', which the installer installed into the user's 'System32' folder.

As with wuwinstaller.exe, appending "/S" to the command line causes wuwinstaller.exe to work with no user interface, as in:

wuwuninst.exe /S

Note that the "S" must be upper case.

More..

Tips for InstallShield users

Set up a Custom Action to "launch executable", from Binary Table, point to the wuwinstaller.exe, use /S if a silent install of the Software Update Wizard is required. It can be put at the end of Install Exec sequence. Set its condition to 'Not Installed'.

For the uninstall, set up a Custom Action to "launch executable", from Directory, point to [Windows System]\wuwuninst.exe, use /S if desired, put at the end of the Install Exec sequence after the previous custom action. Set its condition to 'REMOVE="ALL"'.

Putting both these actions at the end of the Install Exec sequence works fine.

When you use InstallShield to build a single executable (setup.exe) for the install, it must be run As Administrator on Vista in order for the custom actions to work; otherwise you will get an Error 1721 - it cannot launch the executable. If you build a One-Click install, where it gives you a .cab file and creates an install.html with an Install button for you, it seems you don't have to run it as Admin on Vista in order for the custom actions to work.

Licence file location

Important: The Software Update Wizard licence file, WebUpdateSvc4.lic must be installed into the same folder as your application runs from, otherwise the Software Update Wizard will not find it.

However, some deployments involve running the Software Update Wizard on a networked (LAN-based) client computer where the application files to update are located on a server.  The client machine launches the application using a shortcut pointing to the networked location of the application executable.  Installing the licence file in the application folder on the server will not work in a default Software Update Wizard installation because the service runs in the SYSTEM security context and SYSTEM does not (by default) have access to network drives.  To allow the Software Update Wizard to work in this situation you  should, instead, install the licence file into the same folder as WebUpdateSvc4.exe is running from on the local machine - i.e. the Windows system folder (usually C:\Windows\System ).  Important: This solution will only pass the licence file check if the running application is located on a network drive.  To update applications located on the local machine the licence file must be located in the application folder.

More..


Service Control

See also: Software Update Wizard Service Reference for information on start-up parameters for the Windows Service implementation of the Software Update Wizard.  However, If you use wuwinstaller.exe you do not need to know this information unless you want to install the service application in a different security context to SYSTEM.

Running the Service under an alternate security context..


Adding Software Update Wizard to Your Own Installer?

We strongly recommend simply calling wuwinstaller.exe from within your own installer. As explained above, adding the command line argument "/S" will ensure the installation is silent and automatic.

Your uninstaller then calls the Software Update Wizard uninstallation program which wuwinstaller.exe will have installed into the user's System32 folder, 'wuwuninst.exe'.

Nearly every installer maker available allows you to launch additional processes such as wuwinstaller.exe as part of your installation. Whilst we are happy to provide the information below, we do recommend using our wuwinstaller.exe, because we have worked through the inevitable complexity associated with installing/uninstalling a potentially shared set of files, starting and stopping a Windows service etc..

However, if you are determined to incorporate the Software Update Wizard components individually into your own installer, this is what you will need to do:

Installation

Uninstallation