I’ve just reached a solution for the protection I was looking for. It took me a while to plough through the help guides and forums to find the relevant info, so I thought I would share my notes here.
My software ended up with the following functionality:
1. Fully protected, standalone product that can be shared freely.
2. Sell Username/Password combinations through our normal sales channels, including our online shop.
3. Allow use on two PCs only for each Username.
4. Activate software via internet by checking details with our online database.
5. Allow offline activation for any PCs not on the internet.
6. Allow 30 minute free evaluation.
The solution was actually easier than I thought it might be, but the process of working out what was needed difficult. This comes with no guarantees and may be improved by the experts. I also haven’t had time to double check it, so there may be errors. I aim to help, not solve.
I started in V5.5, but the GetPublicationKey(); didn’t seem to work. Upgrading to V6 also provided the 30 min timed evaluation, which wasn’t available in the earlier version.
1. Set up the following pages:
- Introduction
- Registration
- Offline Rego
- Purchase
- Menu (etc)
2. Publication properties / Security tab. Set to allow 30 minute evaluation. On expiry, go to ‘Purchase’ page. Set Registration ID. Leave the ‘Display Standard Evaluation Dialog’ box blank.
NB. Create ‘New ID’ when testing changes, otherwise the previous Evaluation State is remembered.
3. Publication properties / Variables tab. Set the following publication variables (or similar): PubKey, UnlockID, User, Pass, WebResponse.
4. Introduction Page
Onshow: Retrieve the Publication Key using the script ‘PubKey = GetPublicationKey();’ (didn’t seem to work in V5)
Set up the following command: If not (PUBLICATION_EVALUATION = -2) then Go to Page Registration else Go to Page Menu.
5. Registration Page
Create text boxes for Username (accepting variable User) and Password (accepting variable Pass) with an ‘Activate’ button.
Clicking the Activate button should do the following:
a. PostWebData / Source / Variables = ‘User’, ‘Pass’ and ‘PubKey’ (see info below for webpage and tutorials for details)
b. PostWebData / Destination / Variable = ‘WebResponse’
c. If WebResponse = 1 then ‘Change Publication Evaluation’ to ‘Ignore the Expiry Time’. Set variable ‘PUBLICATION_EVALUATION’ to -2 for immediate effect. Go to page Menu. Else Go to Registration page (perhaps include 3 tries and you’re out here).
Also set up the following buttons:
a. Purchase Page – To Purchase
b. 30 Min Trial – To Menu. This must only appear if the PUBLICATION_EVALUATION > 0.
c. Offline activation – To Offline Rego
6. Web page
There are tutorials on this forum to demonstrate how the web pages work in PHP. I use ASP, so it is a little different (‘request.form’ to pick up the posted variables, and ‘response.write’ to return them). There is a mass of guidance on the web for asp/php pages, so only brief details are included:
Set up DB connection
strUser=Request.form("User")
strPass=Request.form("Pass")
Check database for details and retrieve any other info previously placed in DB (e.g. country etc).
IF NOT rs.eof Then
Update record with PubKey, IP address and any other data.
Check for previous PubKey. Check IP address if nec.
Allow 2 PubKeys to be used (ie. 2 PCs) etc
Response = 1 if go ahead OK, else Response = 0
ELSE
Response = 0
END IF
IF Response = 1 Then
response.write("WebResponse = 1")
‘ Or add other variables e.g. (“Resp=1&Country=”&strCountry)
ELSE
response.write("WebResponse = 0")
END IF
Close connections and record sets
7. Offline page
This uses the evaluation mechanism with a manual response described in the help guides.
e.g. “You may activate this software via email, phone or post. Please write down the User Identification Code and Version shown below and send them to us with your UserID and Contact Details.”
Create a textbox displaying the variable PubKey as the ‘User Identification Code’.
e.g. “When you receive the Unlock Code from us, enter it below to activate the software on this machine.”
Create another textbox to accept the UnlockID, with an Activate button. Clicking this runs the script:
if ( TestPublicationKey( UnlockId ) == true )
{
// The text object "EnableText" has an On Show trigger
// with an action to disable the evaluation in future
EnableText.Show()
}
else
{
ErrorText.Show()
}
As suggested, the EnableText box should have the OnShow command with ChangePublicationEvaluation set to ‘Ignore ExpiryTime’. Then Goto page Menu.
The ErrorText box should have the OnShow command Goto Page Offline Reg, perhaps also with a 3 times and you're out feature.
8. Purchase
Purchasing info and link to website.
Buttons with Goto Page Rego and Exit.
Good luck
Dan
ORB Education
|