Jump to content
Sign in to follow this  
Chris2137378

Script needed for registration process

Recommended Posts

I wish I were experienced enough to know if I'm asking for the impossible here...

I'm trying to create a script that will allow the user to register a program I have written. I'm aware of the idea of using normal e-mail to pass along a registration key but I'm attempting to have it look as professional as possible. I would like to have the registration process be built into the software like many other professional programs and happen online without the use of e-mail. Am I dreaming? or is this possible with AutoIt? or maybe other software? Someone please point me in a direction! :( Thanks!

Share this post


Link to post
Share on other sites

You could encrypt a mixture of the user's name and their email address, and create a registration key.

Name Provided: John Q. Doe

Email Address: myanonymousemail@yahoo.com

#include<string.au3>
Func _CreateNewKey()
    Dim $prompt = 1, $user, $email, $enstring
    While $prompt
        $user = StringLower(InputBox("Test", "Real Name?"))
        $email = StringLower(InputBox("Test", "Email Address?"))
        If StringInStr($email, "@") = 0 AND StringLen($user) = 0 Then
            ContinueLoop
        Else
            $enstring = StringUpper(StringLeft(_StringEncrypt(1, $user & $email, $user & "5f4dcc3b5a"), 16))
            ClipPut($enstring)
            MsgBox(0, "test", $enstring)
            $prompt = 0
        EndIf
    WEnd
EndFunc

Func _CheckKey()
Dim $user, $email, $regkey
    
;;Prompt for user input
    Do
        $user = StringLower(InputBox("Test", "Real Name?"))
    Until $user <> ""
    Do
        $email = StringLower(InputBox("Test", "Email Address?"))
    Until StringInStr($email, "@") AND StringLen($email) >= 7;'b@x.com' smallest email address possible
    Do
    $regkey = StringReplace(StringUpper(InputBox("Test", "Registration Key")), "-", "")
    Until StringLen($regkey) = 16
    
;;Start checking to see if information is valid
    If $regkey = StringUpper(StringLeft(_StringEncrypt(1, $user & $email, $user & "5f4dcc3b5a"), 16)) Then
        MsgBox(0, "Test", "Successful!")
    Else
        MsgBox(0, "Test", "Invalid Registration Key!")
        Exit
    EndIf
EndFunc

_CreateNewKey()
_CheckKey()

I think NSIS is still better, but it can be done in AutoIt...

If you want to use AutoIt still, look into making a small gui for the inputs...


Writing AutoIt scripts since
_DateAdd("d", -2, _NowCalcDate())

Share this post


Link to post
Share on other sites

I was unaware of NSIS (like I said I'm still green) so I appreciate that bit of info. I looked at their site and plan on tackeling it next. Thanks for the bit of code as well!

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...