Sign in to follow this  
Followers 0
onestcoder

30 Day Trial

26 posts in this topic

Has anyone written a script that has a 30 day trial in it.

This is what I was thinking. Having the script timestamp a .ini file

then everytime you run it it checks the timestamp then calculates the time diffence.

when it reaches 30 days it ether cancels all functions or delets itself

an ideas on this or has anyone done this???


Need a website: http://www.iconixmarketing.com

Share this post


Link to post
Share on other sites



Has anyone written a script that has a 30 day trial in it.

This is what I was thinking. Having the script timestamp a .ini file

then everytime you run it it checks the timestamp then calculates the time diffence.

when it reaches 30 days it ether cancels all functions or delets itself

an ideas on this or has anyone done this???

Check the scripts and scraps forum using search or even this one for that matter. There have been plenty of topics on the matter.

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Has anyone written a script that has a 30 day trial in it.

This is what I was thinking. Having the script timestamp a .ini file

then everytime you run it it checks the timestamp then calculates the time diffence.

when it reaches 30 days it ether cancels all functions or delets itself

an ideas on this or has anyone done this???

You could write a registry value into a registry hive. But don't use the same name as your program, just something random and deep in the registry.

Good fellow if you find such things :)

Share this post


Link to post
Share on other sites

You could write a registry value into a registry hive. But don't use the same name as your program, just something random and deep in the registry.

Good fellow if you find such things :)

Easily found with regmon, but if you encrypt the date then it would be harder.

Share this post


Link to post
Share on other sites

Easily found with regmon, but if you encrypt the date then it would be harder.

What if they delete the regkey?

Share this post


Link to post
Share on other sites

What if they delete the regkey?

$a_trial = RegRead ( "keyname", "valuename" )
If @error Then MsgBox(0, "You've been caught!", "Nice try, but its not going to be that easy.")

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

$a_trial = RegRead ( "keyname", "valuename" )
If @error Then MsgBox(0, "You've been caught!", "Nice try, but its not going to be that easy.")

If $firstRun Then
   RegWrite ("keyname","valuename","REG_SZ",$a_trial)
Else
  $a_trial = RegRead ("keyname","valuename")
  If @error Then MsgBox(0, "You've been caught!", "Nice try, but its not going to be that easy.")
EndIf

Question is how to determind $firstRun...

Edited by Joon

Share this post


Link to post
Share on other sites

Simple method, install the regkey during installation!

Then, send a Computer Unique ID to a server which will store it.

If the user trys running the installation again, the installation will first check if it has the Computer unique ID in it's database, if it has, installation will terminate.

P.s. look at _WoodUniqueID() in my sig [not the best, but it does work...]

#)

Share this post


Link to post
Share on other sites

That does not solve the problems stated below:

What if they delete the regkey?

$a_trial = RegRead ( "keyname", "valuename" )
If @error Then MsgBox(0, "You've been caught!", "Nice try, but its not going to be that easy.")

Question is how to determind $firstRun...

#)

Share this post


Link to post
Share on other sites

If $firstRun Then
   RegWrite ("keyname","valuename","REG_SZ",$a_trial)
Else
  $a_trial = RegRead ("keyname","valuename")
  If @error Then MsgBox(0, "You've been caught!", "Nice try, but its not going to be that easy.")
EndIf

Question is how to determind $firstRun...

Easy method, have the installer write a random encrypted reg key name based on the cpuid/hddsize or some identifiable unique hardware value containing an encrypted date, have the script delete the installer/source file the first time it is run. Have the program encrypt the location of the key from the hardware when it starts and read the encrypted date. If the date is expired - Bingo... if the key is not found, the program checks for the installer file. If it doesn't find the installer it errors. The installer checks for the existence of the key when it is run in case they download another copy.

While certainly not foolproof, it should work for most.

Share this post


Link to post
Share on other sites

Easy method, have the installer write a random encrypted reg key name based on the cpuid/hddsize or some identifiable unique hardware value containing an encrypted date, have the script delete the installer/source file the first time it is run. Have the program encrypt the location of the key from the hardware when it starts and read the encrypted date. If the date is expired - Bingo... if the key is not found, the program checks for the installer file. If it doesn't find the installer it errors. The installer checks for the existence of the key when it is run in case they download another copy.

While certainly not foolproof, it should work for most.

Actually, that would make the program easier to crack. The more non-readable the registry key, the more obvious it is that it's the time check. Using either the registry or the file-system to store the timestamp isn't going to work. Thirty-seconds in Regmon/Filemon will reveal it to anybody with half a brain.

Share this post


Link to post
Share on other sites

I think self modifying exe may present an option... discuss....

Lar.

Interesting...

One (*very* simple) way is to FileInstall the following with the exe:

  • The source code
  • AutToExe
And edit a variable in the source (example: $g_iDaysRemaining = 30), then recompile the exe.

[obviously deleting the source code afterwards]

#)

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

how about:

#Include <date.au3>
$DatetoEnd = '3/30/2006'
$date = _NowDate()


While $date < $DatetoEnd
    if $date > $DatetoEnd Then
        ExitLoop
    EndIf
WEnd

Not Tested...

EDIT: Doesn't Work**

Edited by NegativeNrG

[size=20]My File Upload[/size]Register at my site and upload.

Share this post


Link to post
Share on other sites

I think self modifying exe may present an option... discuss....

Lar.

What if they delete self modified exe? How would install program knows it's second time installing?

Share this post


Link to post
Share on other sites

Have them register over the phone or internet... Then Give them a code to unlock the EXE... then code needs to be dynamic... some date related code... that they only have a day to use... or something... then the EXE modifies itself to be ok... if they try to start with a fresh downloaded EXE, they would have to register again... or something...

Lar.

That sounds only way to enforce it. All depends on how far he want to go. Typical registry, modified exe, and hidden ini will stop most of regular users.

Share this post


Link to post
Share on other sites

Have them register over the phone or internet... Then Give them a code to unlock the EXE... then code needs to be dynamic... some date related code... that they only have a day to use... or something... then the EXE modifies itself to be ok... if they try to start with a fresh downloaded EXE, they would have to register again... or something...

Lar.

IMHO getting someone to download, install, try, and like software is also the key to getting them to pay for it. If we make it too hard for them to install and try it, they will certainly never buy it.

Valik has a point to my earlier post about the reg key system being easy enough to crack for someone using regmon and having the desire to do so. To my point of view having a few people do this to defeat the trial would be a better outcome than not having anyone tryit because of the hassle to install it. Maybe the key name needs to be something more common so it is more easily overlooked, I don' know, but I've got to believe that most people don't go to this kind of trouble. A lot of the ones that would, would probably also be able to decompile or reverse engineer the program to defeat the protection also.

I would guess unless you are able to run a server and track installation an licensing when a program starts the way Adobe/Macromedia are now doing, there are probably not many methods that can't be defeated.

Share this post


Link to post
Share on other sites

Maybe using something like this:

http://www.autoitscript.com/forum/index.ph...topic=21883&hl=

To log the computers using some computer-unique ID.

Here is a discussion on computer-unique IDs : http://www.autoitscript.com/forum/index.ph...ndpost&p=131508

#)

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

What if you have the installer timestamp a file on a remote server. Then every time the app is ran you have it check the file from the remote server. Then the author of the script could check the file and change the user status whenever.

EDIT: That would also make it were if they buy the program you can just unlock it for them the next time they run it.

Edited by onestcoder

Need a website: http://www.iconixmarketing.com

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0