Navigation: Create Ebooks And Publications >

Web Update for Publications and Ebooks





HTML Executable offers you the functionality to add a Web Update feature to your publications and ebooks. When a new version is released, the Web Update feature can autonomously download and safely install it from your web server. This ensures that your end users always have access to the latest version of your ebook product and can easily upgrade when a new release becomes available.


No third-party software is required for this process, although a web server is necessary to host the web update files generated by HTML Executable.


ℹ Take a look at our Web Update tutorial video to get a clear understanding of the feature.



The Web Update Process


The update process involves a few steps:


1)Fetching the control file (.INF file) from your web hosting server (HTTP/HTTPS based location).

2)Processing the .INF file - this involves verifying new files, versions, and downloading necessary files. Update files not involved in the publication's running process (.EXE, .DLL’s) are immediately extracted to their destination.

3)In the final step, if necessary, the current publication is closed, new EXE and/or DLL files are extracted, and the latest version of the publication automatically starts.


Checking for Updates


You can configure your publication to either automatically check for updates at startup or add a "Check for Updates" option to your publication's menu.


 Updates can also be triggered through script calls, specifically by invoking the `Global.HEStartWebUpdate` HEScript function.


Once a new version is detected, users are informed and guided through the Web Update wizard, where they can choose whether to install the update:



  The version number specified in the Icon / Version page of HTML Executable is used to detect new updates, so make sure to increase this number when you release a new version.


Configuration of Web Update Settings



To set up the Web Update feature, you need to specify:


ØBase URL: The location on your web server where all Web Update files will be hosted. This should be an HTTP/HTTPS URL where all update files (control and CAB files) are available for download. For example, ``

ØWeb Update INF Control Filename: The control file with .INF format that contains necessary instructions and data about the web update.

ØLocal destination folder: The folder on your local disk where HTML Executable will generate web update files. You need to upload the entire contents of this folder to your web host.


⚠ Warning: Make sure the destination folder is empty. If not, you'll be asked to delete its contents before generating files.


Ø"What's new" text: (Optional) The text to display to your users in the Web Update Wizard when a new upgrade is available.

ØCheck for Updates menu item: This option adds a "Check for Updates" item to the Help menu of your publication.

ØAutomatic update check at startup: Enable this option to let your publication check for updates at startup without user interaction.


Generating Web Update Files


HTML Executable generates all necessary files (control and CAB files) for the web update in the specified local destination folder. You'll then upload these files to your web host. These files include:


ØThe .INF control file with instructions for the publication

ØThe .CAB compressed file containing the new publication EXE file and its associated external files


Note: The .CAB file is a standard Microsoft Cabinet file. You can open/edit it with tools like 7-Zip if you need to add more files.


Post-Update Notification


After a successful web update, you may want to display a message or a web page to your end users. HTML Executable sets the global variable `herestartwebupt` to `1` after a successful web update, allowing you to trigger desired actions through HEScript scripting.


Here's a script example you can use in the OnStartMainWindow event:


procedure OnStartMainWindow;
  // When the main window is going to be displayed (just before the homepage is shown).
  if GetGlobalVar("herestartwebupt", "0") = "1" then
    ShowMessage("Welcome to your new publication!"#13#10"What's new:");


The `#13#10` characters insert a new line. You can also choose to show a custom dialog box.


Additional Notes


If the publication EXE file is installed in a Windows system folder such as Program Files, administrator privileges are required, triggering a UAC prompt.

If you wish to customize the billboard image of the Web Update Wizard, add a bitmap file named `hecustomuwbillboard.bmp` in the publication root folder.