IonicWind Software

IWBasic => The Roundtable => Topic started by: tbohon on June 13, 2007, 01:48:37 PM

Title: Demo/Registration Code Tricks
Post by: tbohon on June 13, 2007, 01:48:37 PM
Am curious to know if anyone has implemented an algorithm to make a program act as a 'demo' or 'trial' for x days, deactivating or restricting functionality after that date.

Not a pressing need - just had a program do that to me (I have since purchased it) and am curious to know how it's done.

Tnx in advance.

Tom
Title: Re: Demo/Registration Code Tricks
Post by: pistol350 on June 13, 2007, 02:04:48 PM
I don't have any working code to show , but brewsing my Eba user guide i found some tips.
I just hope it give you a mere idea on what you really want to see.
Cheers!
Peter

QuoteCreating a conditional identifier

A conditional identifier is a word or sequence of letters and numbers that you want to define as TRUE to the preprocessor. Think of them as a constant without any real value. They are only visible to the preprocessor and are created with the $DEFINE statement. For example suppose you have two versions of your program, a trial version and a paid for version. Maintaining two separate projects would be a solution but its much easier to write the source so you can quickly compile one or the other.

$DEFINE TRIAL_VERSION

Would define the identifier TRIAL_VERSION as TRUE to the preprocessor.


Excluding or including code to be compiled

Using the preprocessor commands $IFDEF, $IFNDEF, $ELSE and $ENDIF you can test for a conditional identifier and include or exclude any section of code necessary. Using the identifier from above:

$IFDEF TRIAL_VERSION
    ShowRegisterDialog( )
    Save_Allowed = FALSE
$ELSE
    ShowWelcomeDialog( )
    Save_Allowed = TRUE
$ENDIF

It is important to note that the preprocessor statements are not actually program statements but control what the compiler processes. In our hypothetical trial version/full version code above if the identifier TRIAL_VERSION has been defined then a registration dialog would be shown and saving files disabled. The code to show the welcome dialog is skipped entirely and would not generate any machine code in the executable.

Conditional compiling statements can be nested to allow for advanced situations. Continuing with our hypothetical trial version and we wanted to maintain debugging code in the source:

$IFDEF TRIAL_VERSION
    ShowRegisterDialog( )
    Save_Allowed = FALSE
    $IFDEF DEBUG
        MESSAGEBOX win1,key$,"Key"   
    $ENDIF
$ELSE
    ShowWelcomeDialog( )
    Save_Allowed = TRUE
    $IFDEF DEBUG
        DEBUGPRINT "Program started: Registered name = " + name$
    $ENDIF
$ENDIF

For situations where you only need a negative test just use $IFNDEF

$IFNDEF DEBUG
    ShowWelcomeDialog( )
$ENDIF
Title: Re: Demo/Registration Code Tricks
Post by: Bruce Peaslee on June 13, 2007, 02:37:11 PM
One popular (but not free) method is to use a program like Software Passport (used to be called Armadillo).

I use it and it does a lot more than just that. Google for it if you are interested.
Title: Re: Demo/Registration Code Tricks
Post by: tbohon on June 14, 2007, 07:52:32 AM
Thanks for the comments.  Both have merit and make sense.

Just to take this one more step, how do you suppose they do it when you download a trial version and then, after paying, enter an unlock code to convert the trial version to a full version?  I'm guessing they write the code to an obscure (probably hidden) file somewhere on the system and the software always checks for it to decide if it's a trial or full version of the software maybe ... ?????

Again, just curiosity ...

Tom
Title: Re: Demo/Registration Code Tricks
Post by: Ionic Wind Support Team on June 14, 2007, 08:03:49 AM
I know exactly how they do it ;).   Anyway don't use the demo/full with an unlock key method.  I did that with the original IBasic and you woudn't beleive how easy it is for hackers to trick your demo into thinking it's a full version.

Have two separate versions.  A feature limited demo with a time limit and a full version with a key.  When a customer pays send them the full version and their key.  Armadillo (Software Passport) allows you to build keyed version that have banned keys encrypted in the executable, which allows you to disable a users key if they "share" it.

And no, they don't use a hidded file.  Most use a hidden, encrypted, registry key that is based on a hash of other keys in the registry such as the Windows serial number.  If you were to copy/paste the users hidden registry key to a new computer then the program still wouldn't work until installed with the correct key. 

Armadillo has other features too.  Nanobots which check for tampering of the executable, debugger detector which stops the execution of a program when a debugger is running it, etc. 

Paul.

Title: Re: Demo/Registration Code Tricks
Post by: peterpuk on June 14, 2007, 09:57:44 PM
Just getting a little off track, but when you purchase a second copy of an ionicwind product, you mention that you can give it to a friend.

Doesn't this friend then use your name and the new reg code?
Title: Re: Demo/Registration Code Tricks
Post by: Ionic Wind Support Team on June 14, 2007, 11:29:50 PM
Just PM me the friends name and I will take give you a key.
Title: Re: Demo/Registration Code Tricks
Post by: tbohon on June 15, 2007, 10:31:38 AM
Thanks all for the responses.  Not sure why I decided I needed to know how this is done ... but I consider it a privilege of hitting the big '6-0' last December ... I can ask silly questions and blame it on my age if questioned by anyone!!!  ;D

Y'all have a great weekend - it's raining here in Olympia, WA so I may get out of working in the pasture this weekend (if I'm lucky).

Tom
Title: Re: Demo/Registration Code Tricks
Post by: Rock Ridge Farm (Larry) on June 15, 2007, 11:03:59 AM
We should have a 60 club - I hit 60 this year and a couple of others are 60+
Title: Re: Demo/Registration Code Tricks
Post by: LarryMc on June 15, 2007, 12:43:51 PM
Quote from: Rock Ridge Farm (Larry) on June 15, 2007, 11:03:59 AM
We should have a 60 club - I hit 60 this year and a couple of others are 60+

If you're like me you won't remember you belong to it. :D


Title: Re: Demo/Registration Code Tricks
Post by: tbohon on June 15, 2007, 02:05:20 PM
Belong to what?????  ;)
Title: Re: Demo/Registration Code Tricks
Post by: Rock Ridge Farm (Larry) on June 15, 2007, 02:11:22 PM
Belong to what?
Title: Re: Demo/Registration Code Tricks
Post by: Bruce Peaslee on June 15, 2007, 02:33:10 PM
My wife says I'm not closing in on 60, but reaching six for the tenth time.
Title: Re: Demo/Registration Code Tricks
Post by: jerryclement on June 15, 2007, 06:30:21 PM
 :o  :'(
Let's hurry, I'll be 69 in September!!

Jerry C.
Title: Re: Demo/Registration Code Tricks
Post by: tbohon on June 15, 2007, 10:13:14 PM
Actually I've been telling my co-workers - all of whom are about the age of my oldest son (late 30s) - that I'm really not 60, I'm 39 with 21 years' experience.  The really sad part is that a couple of them didn't realize what I meant ... kind of like the gal at McDonald's the other day who, when their computer went down, tried to give me $23 in change for a $3 purchase for which I'd given her a $20 bill.

<sigh>

Tom
Title: Re: Demo/Registration Code Tricks
Post by: LarryMc on June 15, 2007, 10:38:48 PM
Quotetried to give me $23 in change for a $3 purchase for which I'd given her a $20 bill.

I run in to that on a regular basis at Sonic.  Say my order is $9.20.  I give them $11.00 and they ask me if I want my change without fail.

Title: Re: Demo/Registration Code Tricks
Post by: REDEBOLT on June 15, 2007, 10:50:00 PM
Quote from: jerryclement on June 15, 2007, 06:30:21 PM
:o  :'(
Let's hurry, I'll be 69 in September!!

Jerry C.

Got you beat Jerry! I'll be 71 in September.   ;D
Title: Re: Demo/Registration Code Tricks
Post by: LarryMc on June 15, 2007, 11:13:09 PM
Won't go into the why's and wherefores but the subject of guessing my age came up yesterday and today.  Neither time was I the instigater and both times it was by middle aged women.

Yesterday the guess I was 45.  Today the guess was 84.  I'm fixin' to turn 62.  The gal that guessed 84 seen me walk and the 1st one didn't. :o
Title: Re: Demo/Registration Code Tricks
Post by: jerryclement on June 16, 2007, 05:29:46 AM
Quote from: REDEBOLT on June 15, 2007, 10:50:00 PM


Got you beat Jerry! I'll be 71 in September.   ;D

:) :) That's great Bob, what day?  I'm the 5th, born on Labor Day.

Jerry C.
Title: Re: Demo/Registration Code Tricks
Post by: REDEBOLT on June 16, 2007, 08:19:21 AM
September 16, 1936
Title: Re: Demo/Registration Code Tricks
Post by: Jerry Muelver on June 16, 2007, 08:09:37 PM
Quote from: jerryclement on June 16, 2007, 05:29:46 AM
:) :) That's great Bob, what day?  I'm the 5th, born on Labor Day.
Jerry C.
I was also born on the 5th of September. It must be a "Jerry" thing. In fact, I'm the first of the "baby boom" generation, having been born exactly nine months after the Pearl Harbor attack.  I wanted to be an only child, but didn't quite make it. I'm not sure if it was "now or never" kind of thing, though it did turn out to be frequent thing, since I was the first of eight.  ::)
Title: Re: Demo/Registration Code Tricks
Post by: Allan on June 17, 2007, 06:10:32 PM
September 6th early 40's - and feeling the years.
Allan
Title: Re: Demo/Registration Code Tricks
Post by: tbohon on June 18, 2007, 08:28:06 AM
My problem is that mentally I feel like I'm still in my 40s but physically I feel like I'm about 122 ...  :-\
Title: Re: Demo/Registration Code Tricks
Post by: jerryclement on June 18, 2007, 01:33:36 PM
 ;D
YEP Jerry M., it is a JERRY thing!!   :D

WOW, 365 to 1 shot. Wonder what the odds both have the same first name!!  ::)

Jerry C.  (Jerome)

Title: Re: Demo/Registration Code Tricks
Post by: Jerry Muelver on June 21, 2007, 09:02:42 PM
The odds on two of 26 people in a room having the same birthday are about even. So if you got 26 Jerrys together....
Title: Re: Demo/Registration Code Tricks
Post by: Bruce Peaslee on June 21, 2007, 09:29:43 PM
Quote from: Jerry Muelver on June 21, 2007, 09:02:42 PM
So if you got 26 Jerrys together....

There's an idea to raise the hairs on your neck...