Jump to content

How to make a Autoit program I made a trial versio


Guest Mark7805
 Share

Recommended Posts

Guest Mark7805

ok I made a program many people want but some want trials of it.I want to make a 1 day trial of the program.Does any1 know how I can do this?Sry my english sux:(

Edited by Mark7805
Link to comment
Share on other sites

ok I made a program many people want but some want trials of it.I want to make a 1 day trial of the program.Does any1 know how I can do this?Sry my english sux:(

<{POST_SNAPBACK}>

==> Easy way:

Set a registry key (with the coded date of first program start). At program start check ich the key exists and if the coded date is older than 1 day. However, if somebody monitores the registry, he could simply delete your key to overcome this kind of "protection".

==> Better way:

Use NTFS streams to "hide" your registration data. Streams are not commonly known, and hard to find for a normal user.

To create a NTFS stream:

echo Test > file.txt

echo Hidden-Data > file.txt:regdata <== name stream as you like

To read a NTFS stream:

more < file.txt

more < file.txt:regdata

You will only find file.txt with dir and explorer.

dir file*

C:\>dir file*

24.05.2005 02:11 7 file.txt

==> Hard, but most secure way:

Do it like microsoft ;-)) Gather some information about the system and force the users to register online. Only after registration, they will get a key for one day. The key is dependent on the gathered system info, so it can only be used on one system. O.K. that might be a little bit overkill for a AutoIT script, but hey if the script is realy cool ... ;-))

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

ok I made a program many people want but some want trials of it.I want to make a 1 day trial of the program.Does any1 know how I can do this?Sry my english sux:(

<{POST_SNAPBACK}>

I'm sure that this thread is not related to this one: http://www.autoitscript.com/forum/index.ph...488entry81488

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

I'm working on a small registry thing if you don't want to do streams, I have the test of it done, just going to recode to work in the registry...About 5 minutes please

#include<date.au3>
$string = @ComputerName & "|" & _NowCalc()
MsgBox(0, "test", $string)
$test = StringInStr($string, "|")
MsgBox(0, "test2", $test)
$startdate = StringRight($string, (StringLen($string) - $test))
MsgBox(0, "test3", $startdate)
$diff = _DateDiff("D", $startdate, _NowCalc())
MsgBox(0, "test4", $diff)
If $diff > 1 Then
    MsgBox(0, "test5", "You're registration period has expired.")
EndIf
Edited by MSLx Fanboy

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Link to comment
Share on other sites

Simple, and moderately secure for people who don't know how to decrypt the registry key.

Oh, the encrypted key looks like this for me:

092B86DF7325379F5553559E113006F43CD5E4D9E12E0F47846B48251287AD5DE95C3A67E83D

You tell me the date, I'll give you a cookie. Down to the second please :(

#include<date.au3>
#include<string.au3>

If RegRead("HKCU\Software\Microsoft\Windows\Current Version", "MyNewProgram") = "" Then
    RegWrite("HKCU\Software\Microsoft\Windows\Current Version", "MyNewProgram", "REG_SZ", _StringEncrypt(1, _NowCalc(), @ComputerName))
    SetError(0)
EndIf
$startdate = _StringEncrypt(0, RegRead("HKCU\Software\Microsoft\Windows\Current Version", "MyNewProgram"), @ComputerName)

If _DateDiff("D", $startdate, _NowCalc()) > 1 Then
    MsgBox(0, "test5", "You're registration period has expired.")
    Exit
EndIf

Feel free to get rid of that last variable if you wish. I would, but it would look a bit too unorganized :(

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Link to comment
Share on other sites

Simple, and moderately secure for people who don't know how to decrypt the registry key.

Oh, the encrypted key looks like this for me:

You tell me the date, I'll give you a cookie.  Down to the second please :(

#include<date.au3>
#include<string.au3>

If RegRead("HKCU\Software\Microsoft\Windows\Current Version", "MyNewProgram") = "" Then
    RegWrite("HKCU\Software\Microsoft\Windows\Current Version", "MyNewProgram", "REG_SZ", _StringEncrypt(1, _NowCalc(), @ComputerName))
    SetError(0)
EndIf
$startdate = _StringEncrypt(0, RegRead("HKCU\Software\Microsoft\Windows\Current Version", "MyNewProgram"), @ComputerName)

If _DateDiff("D", $startdate, _NowCalc()) > 1 Then
    MsgBox(0, "test5", "You're registration period has expired.")
    Exit
EndIf

Feel free to get rid of that last variable if you wish.  I would, but it would look a bit too unorganized :(

<{POST_SNAPBACK}>

Niceone. Thou in the above code the "Current Version" should be "CurrentVersion" in registry :
Link to comment
Share on other sites

I guess that means that it was corrected, because it ended up in the right place. I've memorized that folder now, so I hardly ever check to make sure I typed it in :">

Edited by MSLx Fanboy

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...