The Software Update Wizard lets you add 'update over the web' functionality
to your applications with literally a single line of code.
It works with 32-bit and 64-bit Windows 10, Windows 8.x, Windows 7, Windows Vista, Windows Server 2008 / 2003, Windows XP and Windows 2000. It can be integrated with any development language capable of launching a Windows process using ShellExecute() or calling a Windows 32-bit dll function. It requires no server-side processing and works with any web server.
Your application simply calls a function from our 'wuw4.dll' DLL, which is a simple (non-COM) 32 bit Windows DLL that does not need COM registration. Alternatively, you application can launch our wuwstub.exe program, which then loads wuw4.dll and calls its exported function with the script url it receives as a command line argument. A single line of code in your application is all it takes to initiate an update check...
// Sample call to wuw4.dll from your application
// Sample launch of wuwstub.exe from your application
ShellExecute(NULL, "open", "wuwstub.exe", "http://www.myserver.com/updatescript.txt", NULL, SW_SHOW);
Important note for .Net developers: (click to expand)
The default compiler option for building a .Net application causes the executable to run as a 32-bit application on 32-bit Windows platforms and as a 64-bit application on 64-bit Windows platforms. Windows does not allow a 64-bit application to load a 32-bit DLL and call its functions. There are two options to resolve this issue:
- Change the .Net 'Target platform' setting in Visual Studio from 'Any cpu' to 32 bit cpus.
- Do not use wuw4.dll directly. Instead, call the wuwstub.exe utility using ShellExecute() or similar as shown above. Wuwstub.exe is a simple 32 bit application which is, itself, linked to wuw4.dll. Your app passes the url of the update script on the command line which launches wuwstub.exe. Wuwstub.exe initiates the update check by loading wuw4.dll and calling its exported function. (Tip: launch wuwstub.exe with the SW_HIDE flag to avoid the temporary display of a command window.)
Our recommendation is to use the wuwstub.exe option as it lets your application take full advantage of the 64-bit environment when it is available, is simpler to implement in your code (you just call ShellExecute() with the update script URL) and your deployment simply needs to install the supplied wuwstub.exe utility into the same folder as your application is installed into. (Note: wuwstub.exe is NOT included in the supplied wuwinstaller.exe redistributables installer. You must remember to include it in your own application installer if you wish to deploy this option.)
A simple update can be implemented with a 3 line update script on your web server, although an update script can include many considerably more powerful update commands too:
Just upload this script as a text file to the 'updates' folder on your web server, along with the new version of MyApp.exe and your updates are ready to go. The only processing requirement on your server is the ability to respond to standard http: protocol requests. No additional server-side processing is required as all the logic is executed by the Software Update Wizard on the client computer.
The Software Update Wizard fully supports updates on Windows 10, Windows 8.x, Windows 7, Vista, Windows Server and also in XP environments where the logged in user does not have rights to 'Program Files' or other sensitive folders. It also supports automatic updates in a Windows Terminal Services environment.
The Software Update Wizard adds an overhead of less than 300K to your installer if you use our supplied wuwinstaller.exe installer program (which can be run completely silently, using the "/S" command line argument).
More information on scripts.. (Click to expand)
The above example is the simplest possible update script. The  is the script block number - the Software Update Wizard's most basic way of keeping track of which updates have been made (but see RunAlways). The Filename keyword refers to the new version file on your web server. The KillProcess keyword causes the Software Update Wizard to close any running instances of the specified application file so that the MyApp.exe file can successfully be updated to the new version. The Software Update Wizard then completes the update and automatically restarts the updated version of MyApp.exe.
The Software Update Wizard has many advanced capabilities. For example, you can put your updates in secure server folders, authenticate, version check, launch any number of processes either before or after the updated file is downloaded and installed, download and automatically unzip zip files, provide update information and prompts in any number of languages and much, much more.
Here is a more 'standard' script - a few more lines, but then, it does a lot more!
Message=Hello <USERNAME>,||Version 126.96.36.199 of MyApp.exe is now available and will be downloaded and installed for you.
Message=You already have the latest version of MyApp.exe!
This script only updates the user's PC if their version of MyApp.exe is older than version 188.8.131.52, the version specified in the FileVersion line. The RunAlways line forces the script to be evaluated every time the script is run. The block  part posts a message to the user in the event that they already have the latest version of MyApp. Please see our worked examples page for descriptions of a number of different scripts. Also, each keyword is fully described on the Keywords page.
You can use the Software Update Wizard Project Manager utility to help develop and test your Software Update Wizard scripts, along with the third party editor macro files we have supplied with the Software Update Wizard.
The Software Update Wizard does much more than just alert the user of an update. It:
- Downloads and installs you application updates, (even if the user does not have rights to the application folder)
- Downloads multiple files in a zip and automatically unzips them, or downloads a single file - the choice is yours
- Advises the user of what is going on in the user's native language (using the Software Update Wizard's multi-language feature)
- Runs any required processes on the user's machine, either before or after the update has been installed (e.g. the update file is your installer / patcher, the Software Update Wizard automatically launches it once it's finished downloading. However, please be sure to read these important notes on the security implementations and techniques required for launching software installers from automatic update solutions.)
- Elegantly closes all instances of the application to be updated (even in a Terminal Services environment) and either restarts them once the update has been installed or advises all users that the update has been completed.
- Lets you launch web pages to a planned frequency, which can either be used for marketing or product education purposes (independently of automatic updates)
- Gives you a very high degree of control over the 'look and feel' of the update experience.
Software Update Wizard - 1-pass versus 2-pass mode
The Software Update Wizard normally handles all the interface elements associated with processing updates. Under this mode of operation you can either accept its default message texts (which are in PowerProgrammer English!) or you can completely customise the texts yourself using language files. (Language files also allow you to provide messages in users' native languages based on their Windows Regional Settings.) Either way, all you do from your application is give the Software Update Wizard the url of the update script and it does the rest. This is called '1-pass mode'.
However, if you would prefer to handle the interface with the user from within your own application the Software Update Wizard can also operate in 2-pass mode. In this mode, the first call to the Software Update Wizard causes it to download and parse your update script, but instead of actioning the updates it will generate an XML file containing the updates which apply to the user's platform and current software versions. You can then post your interface and make a second call to the Software Update Wizard to make it action the selected updates your interface has determined. The Software Update Wizard then handles the update without showing its interface. Click here for more information on 2-pass mode.
Here is our recommended route through the documentation. Please note that only selected help pages are included in our route to get you started with the Software Update Wizard. Please also see the Help Contents of this help file for the full documentation available to you.
|First Principles.. more..||More information on the Software Update Wizard's capabilities.|
|Architecture||This topic describes the architecture of the Software Update Wizard and explains exactly how it works from a conceptual perspective, so that you understand the implementation and deployment options available. See also our briefing notes on using the Software Update Wizard in a 64 bit environment.|
|Installation||This section explains how to deploy the Software Update Wizard within your own application installers.|
|A Worked Example|| This section takes you through integrating the Software Update Wizard
into your application.
It then describes the sequence of what happens during an update, both from the user's perspective and also from a technical perspective.
|Example update scripts||This section provides numerous examples of Software Update Wizard scripts together with a detailed explanation of how each one works.|
|2-Pass Mode||This section provides help for handling the interface elements of software updates in your own application, rather than allowing the Software Update Wizard to handle the interface with the user.|
|Keywords:||Every Software Update Wizard script keyword described in detail, with examples of usage.|
|Upgrading from V3 to V4||For users of earlier versions of the Software Update Wizard, this section explains that V3 and V4 can coexist if required, and also provides guidance for how you can use V3 to smoothly update your users Software Update Wizard versions to V4.|
|Windows 10 Controlled Folder Access||This page provides the latest information on the Controlled Folder Access feature introduced from Windows 10 version 1709. At the time of writing there are NO issues and no actions required for the Software Update Wizard to operate successfully under Controlled Folder Access.|
|Working with Language Files||The Software Update Wizard can (optionally) support updates in multiple languages, so that you users see advices and prompts in their own language. This section shows you how to implement multi-language updates.|
|Campaign Manager||In addition to providing automatic software updates, the Software Update Wizard can also serve marketing campaigns to your users using a similar approach as update scripts. Your Campaign Manager script can control how often users see your campaigns, when they run from and whether the user has the option to decline the campaigns.|
|Troubleshooting||A big effort has been made in this version to provide developers with the maximum amount of troubleshooting information and feedback. This section explains how to troubleshoot script and deployment issues.|
|Frequently Asked Questions (FAQ)||This is the FAQ page - a collection of hints and tips which you are recommended to read!|
However, we are very happy to provide technical support for our software should you need it. If you require our help or you have suggestions for improving the Software Update Wizard, please email us at support@PowerProgrammer.co.uk. We promise to reply as promptly and helpfully as possible to every message received!
(Please include the text "Software Update Wizard" in your subject text in order to guarantee that your email passes through our spam filters!)
When you request support we will be able to help you most effectively if you give us as much information about the specific problem you are experiencing as you can! So if possible, please include the following (if relevant) in your email:
- A full description of the problem, and whether it happens intermittently or every time.
- Ideally the url of your update script, or failing that, the full script as a text attachment. (If you provide a URL we can run it though in debug mode at our end.)
- Switch SuperLogging on (as described here) and send us a WebUpdateSvc4.log file (located in the System folder) which shows the problem occurring with SuperLogging enabled.
- Any other information you can think of which would help us understand what is happening or enable us to reproduce the behaviour in our test environment.