First Principles

This section presents an overview of the Software Update Wizard, so that you can understand the overall technical context in which it runs.

What does the Software Update Wizard do?

The Software Update Wizard fulfils two functions for developers:

Both capabilities are driven by simple scripts which you author, and the integration of the Software Update Wizard software components to your application.

Most Software Update Wizard users use the software primarily for automatic software updates, but occasionally use the Web Marketing Campaign capability to promote new (paid-for) versions of their software to the existing user base.  Each capability uses the same Software Update Wizard components, and can be used individually or together.

You can integrate the Software Update Wizard with your application with literally a line of code.  We supply an installer for the Software Update Wizard client components which you can call silently from within your own software installer.

The Software Update Wizard has no server-based processing requirement (other than the ability to respond to standard http:/ requests).  Any web server will therefore work perfectly.  No cgi, isapi, php, asp are required although if you are able to dynamically generate your Software Update Wizard scripts you can gain valuable additional information / control over user updates.

Automatic Software Updates

The Software Update Wizard lets you add 'update over the web' to your application with a single line of code.  When an update is available, users will see a dialog box, which you can customise with your own branding and text, which looks like this:

A simple update script can have around 3-4 lines, as demonstrated further down this page.

However, the Software Update Wizard is a mature product with a huge number of powerful additional features.  So, in addition to simply checking for the update and downloading the file, it can do the following:

You can use our Software Update Wizard Project Manager utility and text editor syntax definition files to prepare, test and upload your updates:

Web Marketing Campaigns

Launching a web page from your application is fairly trivial, but what if you want more control over when and how often the page is launched?  This is where the Marketing Campaign function of the Software Update Wizard can help.  It adds the following control options to your campaign:

How Does the Software Update Wizard Work?

Here's a top level description of how the Software Update Wizard works.

Automatic Software Updates

Your application calls the Software Update Wizard, either through a call to our wuw4.dll Windows Dynamic Link Library, launching wuwstub.exe, or directly via the Windows ShellExecute() API call.

The Software Update Wizard then downloads a small script file from the target server, the URL of which was passed to the Software Update Wizard from the original wuw4.dll call or ShellExecute() API call.

If the server is unreachable (e.g. the user is not connected to the internet or the script file does not exist) then the Software Update Wizard stops processing and nothing happens on the client computer.

If the script can be downloaded, the Software Update Wizard parses it and processes the updates contained in the script file, if applicable to that client computer.  Here is a very simple script, just so you get the broad principle:

Message=Hello <USERNAME>,<p>There is a new version available which will now be installed.

The first line is the update block number ("[4]").  The Software Update Wizard keeps count of which block numbers have been successfully processed in the WebUpdateSvc4.ini file in the user's Windows folder.  You can have any number of blocks in a script, but they must be in ascending order down the script.

Line 2 contains a customised message to the user, advising them that an update will take place.  At run time the "<USERNAME>" constant will be expanded to the name of the logged in user.

Line 3 contains the URL of the update file that will be downloaded.

Line 4 causes all running instances of MyApp.exe to be closed on the user's computer prior to the update, so that MyApp.exe can be updated without the need for a reboot.  Once the new version has been downloaded and installed the Software Update Wizard will automatically restart MyApp.exe.

That's it!  You just upload this script file and the MyApp.exe file to your web server.  You can make a Software Update Wizard call every time your application starts up or you can provide a "Check for Updates" menu option within your application.  You now have automatic updates in your application with virtually no effort on your part, and none on your users' parts!

Campaign Management

This works pretty much the same way as software updates.  You have a script file on your server, with Campaign Manager syntax.  Your application passes the URL of the Campaign Manager script to the Software Update Wizard  and the Software Update Wizard then parses it and launches any web pages which meet the specified criteria in the script.

Here is an example script:


AskBeforePrompt=Hello there <USERNAME>!<p>Would you like to see the latest news
from PowerProgrammer?



The first line identifies the script as a Campaign Manager script, rather than a software update script.  Each campaign is in a separate block of lines within the file.  As you can see from the example, you can determine when the campaign starts and stops, how many times the user should see it in total and in any one day, you can give the user the option to decline seeing the campaign or force them to see it.  The syntax is explained in more detail here.