DWebPro Trial Generator Software
The DWebPro Trial Generator software enables you to create a
dwebpro.exe binary that provides
trialware capabilities. The trialware features available are:
- Day limited
The software will run only for the specified days.
- Time limited
The software will run only before the specified date.
- Start limited
The software will run only for the specified times.
The DWebPro Trial Generator also includes a registration and serial number generation feature. Generated serial numbers are based on the user's name and, if desired, on a Hardware ID of the user machine.
To Create the Trialware Version
- Start the DWebPro Trial Generator tool.
- Configure the DWebPro Trial Generator options, as desired.
- Save the project in a safe place.
- Use the File, Build Trial menu option to create your trialware
dwebpro.exebinary.
If the Enable Registration option
is selected, the generated dwebpro.exe binary supports the user
registration.
If the Hide Startup Form option is selected, DWebPro will not display the trial form at startup unless the trial period is expired.
If the Check System Time option
is selected, the generated dwebpro.exe binary will check the system time to
verify if it has been manipulated to work around the trial
limitation. If a manipulation is discovered, DWebPro will show the
invalidsystemtime.html file (see
below).
If the User Hardware Key option
is selected, the serial number required for registering the
generated dwebpro.exe binary will be
based on a unique Hardware ID. This Hardware ID will be unique for
each product and user PC.
Perform the following steps to clear trial version execution information from your system so that you can test your trialware in your development environment:
- Start the DWebPro Trial Generator utility.
- Open the project file used to generate your trialware.
- Select File, Reset.
Perform the following steps to bundle the license with your trialware using the DWebPro Bundler tool:
- Start the DWebPro Trial Generator utility and build the trialware following the steps specified above.
- Copy the
dwebpro.exebinary from the deploy folder (typically C:\DWebPro\deploy\) into the bundler folder (typically C:\DWebPro\bundler\). - Start the DWebPro Bundler tool and bundle the license.
User Interface Customization
You can customize the forms shown by DWebPro at startup by editing the files contained in the deploy\trial folder (typically C:\DWebPro\deploy\trial). Note that each file that supports a different language must be in a separate folder. Supported languages are: Afrikaans, Albanian, Arabic, Basque, Belarusian, Bulgarian, Catalan, Chinese, Croatian, Czech, Danish, Dutch, English, Estonian, Faeroese, Farsi, Finnish, French, German, Greek, Hebrew, Hungarian, Icelandic, Indonesian, Italian, Japanese, Korean, Latvian, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, Slovak, Slovenian, Spanish, Swedish, Thai, Turkish, Ukrainian, Vietnamese.
You must include the following files in each folder:
- styles.css
- invalidsystemtime.html
- daytrial.html
- timetrial.html
- starttrial.html
- registration.html
- registeredversion.html
- unregisteredversion.html
- expiration.html
The styles.css file includes
styles used to integrated the form into the Windows user interface.
See the comments included for more details of its behavior.
When each file is loaded, DWebPro searches for and replaces some constants so that you can create a better user interface. The following constants are replaced in each file:
| Filename | Constants |
|---|---|
styles.css
|
%WINDOW_BACKGROUND_COLOR% %WINDOW_COLOR% %WINDOW_FONT% %WINDOW_FONT_SIZE% |
invalidsystemtime.html
|
%EXPIRATION% %HARDWARE_ID% |
daytrial.html
|
%EXPIRATION% %DAYS_REMAINED% %HARDWARE_ID% |
timetrial.html
|
%EXPIRATION% %DAYS_REMAINED% %HARDWARE_ID% |
starttrial.html
|
%STARTS_REMAINED% %HARDWARE_ID% |
registration.html
|
%HARDWARE_ID% |
registeredversion.html
|
%USERNAME% %SERIALNUMBER% %HARDWARE_ID% |
unregisteredversion.html
|
%USERNAME% %SERIALNUMBER% %HARDWARE_ID% |
expiration.html
|
%EXPIRATION% %HARDWARE_ID% |
When DWebPro loads the HTML pages it will search for the height and width attributes in the BODY tag and use their values to set the form size. If you want to include images and Flash animations in your registration forms, you must include the following code in the HEAD section of each page:
<base href="%BASE_URL%" />
Trialware Workflow
DWebPro will show one of the following pages at startup depending on a specific event:
| Filename | Events |
|---|---|
invalidsystemtime.html
|
This file displays if the user has attempted to change the system time to bypass a time based trial feature (Day Trial or Time Trial). DWebPro closes after displaying this page. |
daytrial.html
|
This file displays if the trial period has not yet expired and you have selected a trial type of Day Trial. |
timetrial.html
|
This file displays if the trial period has not yet expired and you have selected a trial type of Time Trial. |
starttrial.html
|
This file displays if the trial period has not yet expired and you have selected a trial type of Start Trial. |
registration.html
|
This file displays if you have not selected a trial type. |
registeredversion.html
|
This file displays when the user enters the correct registration data. |
unregisteredversion.html
|
This file displays if the user enters the wrong registration data. DWebPro closes after displaying this page. |
expiration.html
|
This file displays if the trial period has expired after having selected one of the trial types. |
In all of the above HTML files, you can insert hyperlinks to
additional information so that your users can read more information
about the your software (such as licensing information). External
links should use the target="_blank"
attribute or a window popup JavaScript function. Local links (such
as to license.html in the
deploy\trial\language folder) must
be relative links to the current folder. DWebPro will search for
them in the correct language subfolder.
Actions
There are two main actions that a user can do during the trial process:
- Close the form.
- Enter registration information.
For closing the trial form, you have to create a hyperlink (or a button) such as the following:
<a href="?action=close">Close</a> <input type="button" onclick="location.href='?action=close';" value="Close" />
For entering registration information, you have to create a POST form such as the following:
<form action="" method="post"> Username: <input type="text" name="username" /> <br /> Hardware ID: <input name="text" type="text" value="%HARDWARE_ID%" readonly="true" /> <br /> Serial Number: <input type="text" name="serialnumber" /> <br /> <input type="submit" value="Register" /> <input type="hidden" name="action" value="register" /> </form>
Once you have built your trialware software (and bundled the
license), you can add another protection level using the
DWEBPRO_HASH constant in your code to
lock the Web application to the distributed dwebpro.exe binary. Here is sample PHP code that
you can execute at the beginning of each script (using a
require() statement):
<?php
if (preg_match('/dwebpro/i', $_SERVER['SERVER_SOFTWARE']) &&
(!function_exists('dwebpro_getvar') ||
(dwebpro_getvar('DWEBPRO_HASH') != '0F2CBE2FF0822E9744CD28A4BC1005A5'))) {
die('<h1>Invalid EXE</h1>');
}
?>
In the above example, the 0F2CBE2FF0822E9744CD28A4BC1005A5 value
must be replaced with the hash of the new dwebpro.exe file. You can find the new hash value
using code like the following:
<?php
print(dwebpro_getvar('DWEBPRO_HASH'));
?>


