Deploying the Web Update Wizard
As discussed in the Web Update Wizard architecture
page, you can deploy the Web Update Wizard as a Windows Service, or as a standard
Windows executable.
Both implementations have the same functionality, with the exception that when the
Web 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.
(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
Web 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 Web Update Wizard is with the supplied wuwinstaller.exe,
which is located in the 'WebUpdateWizard' 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.
If you use wuwinstaller.exe to deploy the Web Update Wizard then the only other
installation responsibility you have is to install the Web Update Wizard licence
file, WebUpdateSvc4.lic, into the same folder as your application. The developer
installer will have installed WebUpdateSvc4.lic into the 'WebUpdateWizard' folder
within your 'Program Files'.
More..
In common with most modern installers, wuwinstaller.exe needs to be run by a
user with Administrator rights, because it installs files into the "Windows\System32"
folder and endeavours to install/start a Windows service (the Web Update Wizard
service).
You have already 'seen' wuwinstaller.exe in operation, as the developer installer
used it to install the Web Update Wizard service and core components onto your computer.
Wuwinstaller.exe contains the following core Web Update Wizard components, and installs
them into the System32 folder underneath Windows:
- WebUpdateSvc4.exe - the Web Update Wizard service application
- WuWUI.exe - the Web Update Wizard User Interface (UI) component
- wuw4.dll - the Web Update Wizard dll, whose exported functions your application
calls to initiate update checks
- wuwuninst.exe - uninstaller program for the Web Update Wizard redistributable
In addition, wuwinstaller.exe installs and starts the Web Update Wizard service
application, which you can verify via the services.msc applet.
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..
The wuwinstaller.exe redistributable takes care of shared file counting. In
other words, each time wuwinstaller.exe is run it creates/increments a shared file
counter in the Windows registry. Each time wuwuninst.exe is run the shared
counter is decremented. When it reaches zero the shared files are removed.
The registry key which contains the counter is:
HKEY_LOCAL_MACHINE\SOFTWARE\Web Update Wizard\InstallCount
We recommend that you use wuwinstaller.exe to deploy the Web Update Wizard because
it removes your responsibility for installing and starting the service and ensuring
that uninstalling your application does not intefere with other applications which
depend on the Web Update Wizard for automatic updates. It adds only 275Kb
of overhead to your installer.
If you decide to 'roll your own' installer then you will have to address all of
the issues outlined above - i.e.:
- Install and start the service on installation
- Ensure when you uninstall your app it does not uninstall the Web Update Wizard unless
no other applications depend on it
- Stop and uninstall the service from Windows
Licence file location
Important:
The Web Update Wizard licence file, WebUpdateSvc4.lic must be installed into
the same folder as your application runs from, otherwise the Web Update Wizard will
not find it.
More..
However, if you really need to locate the licence file in a different folder, you
may do so, and then pass the folder within the WebUpdate() or WebUpdateWait() URL,
as shown here:
WebUpdate("http://www.mycompany.com/updatescript.txt|c:\Program
Files\MyApp\LicenceFolder");
The folder path is appended to the update script URL and separated with a '|' character
(ASCII character decimal 124 / hex 7C).
However - please note that if you use this option the default update folder
(i.e. if you do not use a
TargetFolder
keyword) will be the folder you specified for the licence file. Also the <CLIENTFOLDER>
folder substitution variable will return the folder you specified for the licence
file.
Therefore, unless you have a compelling reason to deviate, we strongly recommend
that you install WebUpdateSvc4.lic into the folder of your running application.
Service Control
See also: Web Update Wizard Service Reference
for information on start-up parameters for the Windows Service implementation
of the Web Update Wizard. However, If you use wuwinstaller.exe you do
not need to know this information!
Adding Web 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 Web 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 Web Update Wizard components
individually into your own installer, this is what you will need to do:
Installation
Uninstallation
- You must decrement the value of the registry counter at HKEY_LOCAL_MACHINE\Software\Web
Update Wizard\InstallCount and only proceed with the uninstallation
if it reaches zero. Otherwise you risk uninstalling the Web Update Wizard
whilst other applications still depend on it for updates.
- If the counter has reached zero you must stop the service and uninstall
it from Windows services database, using the following command line arguments
to WebUpdateSvc4.exe:
WebUpdateSvc4.exe -e
WebUpdateSvc4.exe -u
- Then reverse out everything from Installation
as per a normal uninstallation.