View Poll Results: Is it Good

Voters
30. You may not vote on this poll
  • I Agree

    17 56.67%
  • I Do Not Agree

    7 23.33%
  • I Don't know

    6 20.00%
Results 1 to 28 of 28

Thread: Expire The Project After 15 Days

  1. #1

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Thumbs up Expire The Project After 15 Days

    Hi all
    There is a big problem to uninstall the software after some days… There are many method but
    I think that this is the simplest and secure method
    So all u please check it and tell….
    How it is

    VB Code:
    1. Private str As String
    2. Private str1 As String
    3. Private str2 As String
    4. Private initialDate As Date
    5. Private expDate As Date
    6. Private usedDate As Date
    7. Private Expire As Boolean
    8.  
    9. Sub Main()
    10.     Call Expire_Project
    11. End Sum
    12.  
    13.  
    14. Public Sub Expire_Project()
    15. str = GetSetting("Project Name", "Expiry", "Initial Date")
    16. 'First Get the Value from the Registry
    17.  
    18. If Len(Trim(str)) < 1 Then
    19. 'If the Registry Value is not set then Set the Value
    20.     SaveSetting "Project Name", "Expiry", "Initial Date", Date
    21.     expDate = DateAdd("d", 15, Date)
    22.     'Add 15 days to the Current Date
    23.     SaveSetting "Project Name", "Expiry", "Expiry Date", expDate
    24.     'Here I have Given 15 days for expiration of the Software You can Give 'n' no of days as you like
    25. Else
    26.     str1 = GetSetting("Project Name", "Expiry", "Used Date")
    27.     'If this Registry Value is not Set then
    28.     If Len(Trim(str1)) < 1 Then
    29.         str = GetSetting("Project Name", "Expiry", "Initial Date")
    30.         'Get the Previously set Initial Value from the Registry
    31.         initialDate = CDate(str)
    32.         str2 = GetSetting("Project Name", "Expiry", "Expiry Date")
    33.         'Get the Expiry Value from the Registry
    34.         expDate = CDate(str2)
    35.             If Date > expDate Or Date < initialDate Then
    36.             'Compare Registry Values with the Date, if they are bound with in the Initial Value of the Software and Expiry Value of the SOftware then only the Program will run
    37.                 SaveSetting "Project Name", "Expiry", "Used Date", "True" 'Now set the Used Date value to True
    38.                 MsgBox "Software Has Been Expired; You cannot run the Software by Setting the Date Backwards", vbExclamation, "Software Expired"
    39.                 Expire = True
    40.                 Exit Sub
    41.             End If
    42.         Else
    43.             MsgBox "Software Has Been Expired; You cannot run the Software by Setting the Date Backwards", vbExclamation, "Software Expired"
    44.             Expire = True
    45.             Exit Sub
    46.         End If
    47. End If
    48. End Sub

    check It Out....

    Shakti Singh Dulawat


    thanks..
    Last edited by shakti5385; Aug 7th, 2006 at 01:23 AM.

  2. #2
    Fanatic Member
    Join Date
    Jul 2006
    Location
    nasik,india
    Posts
    909

    Re: Expire The Project After 15 Days

    i have tried this code.
    But user who know registry path and can edit registry values can break this code.

  3. #3

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Expire The Project After 15 Days

    have tried this code.
    But user who know registry path and can edit registry values can break this code.
    if any one able to change in the registry then he can do any thing.....
    but tell me one thing that how the client know that this software saving the date in the registry....

    this is u know and i know

    check and change tha date see what happen....

    It is working perfectlly here......
    Last edited by shakti5385; Aug 4th, 2006 at 05:42 AM.

  4. #4
    Lively Member d00by's Avatar
    Join Date
    Jul 2006
    Posts
    102

    Re: Expire The Project After 15 Days

    would be cool if there was some sort of way to hardcode the varible into the project using php or something, so that like when user clicks download, the page actually sets the date in the script, then compiles the program for you, then gives the user the download link to the newly compiled project

  5. #5

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Expire The Project After 15 Days

    but i thinks my code send the date of first open project... and when user run it second time it compare that time.....
    and in the middle if u are changing the date then it autolatically expird....
    run the code and try to change the date...

  6. #6
    New Member
    Join Date
    Nov 2005
    Posts
    5

    Re: Expire The Project After 15 Days

    nice code.. but it would be better if you encoded the date before writing it to the registry. you may just use a simple array or ptu an encode/decode key in a txt file to use as a base.. then when program opens it will decode and look at the date. safe and easy...(ok maby not that easy but not more than a few hours of work for you) in the and its just a date composed of 8 characters.

    so that although the user knows how to edit registry, he wouldnt understand from a date like "aa jkfdsa hhe".
    Last edited by Immortal Knight; Aug 5th, 2006 at 05:10 AM.

  7. #7

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Expire The Project After 15 Days

    in my code i show the line that adding the registry number.... so programmer can use it......
    we are not showing the user that it is adding the programme in to the registry

  8. #8
    Oi, fat-rag! bushmobile's Avatar
    Join Date
    Mar 2004
    Location
    on the poop deck
    Posts
    5,592

    Re: Expire The Project After 15 Days

    Quote Originally Posted by shakti5385
    in my code i show the line that adding the registry number.... so programmer can use it......
    we are not showing the user that it is adding the programme in to the registry
    but the first thing that someone attempting to bypass this would do is check under the registry for any Keys belonging to your app.

    Anyone with any knowledge of the registry could get round it.

  9. #9
    Lively Member d00by's Avatar
    Join Date
    Jul 2006
    Posts
    102

    Re: Expire The Project After 15 Days

    you could do a dual action approach. Store one date in the registry, and one date in an ini file. If they dont match, then delete the ini file, and if there is no ini file, then program doesnt worik.

  10. #10

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Expire The Project After 15 Days

    you could do a dual action approach. Store one date in the registry, and one date in an ini file. If they dont match, then delete the ini file, and if there is no ini file, then program doesnt worik.
    if u have an idea then modify code and post here....
    then i will check.... i haven't idea about the ini file....

  11. #11

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Expire The Project After 15 Days

    Steps Involved
    1) Make a table in the database that contain the field table name is skey and the three field are
    PID -Text -Showing the product ID
    SNO -Text -Showing the serial number of the product
    Allow -Boolean -True if product is registered

    2) What we are doing.
    We are running our project and saving the value of the serial key in the the database and the database is already password protect.
    After 15 days we are expires our product and asking the user to put a serial number in the text field.
    User is able to see the product Id but he is not able to get the serial number. He now give us the product id and we give us the serial number. Now he put the serial number where the project asking for putting the serial number and we match the serial number from the database and it both match the database Boolean value is become true and user get permission to use the project.

    VB Code:
    1. Public Product_ID As String
    2. Public Serial_Number1 As String
    3. Public Registered As Boolean 'True if Software registered
    4. ‘This function giving us the serial number of the product
    5.  
    6. Public Function Serial_Number()
    7. Product_ID = Product_Number
    8. Serial_Number1 = Serial_Number2(Product_ID)
    9.  
    10. TSQL = ""
    11. TSQL = "select * from Skey"
    12. Set RTMP = Get_Special_Record_Set(TSQL)
    13. If RTMP.RecordCount = 1 Then
    14.     Registered = True
    15.     Exit Function
    16. End If
    17. While Not RTMP.EOF
    18.     RTMP.Delete
    19.     RTMP.MoveNext
    20. Wend
    21. If RTMP.RecordCount = 0 Then
    22.     RTMP.AddNew
    23.     RTMP!PID = Product_ID
    24.     RTMP!sno = Serial_Number1
    25.     RTMP.Update
    26. End If
    27. End Function
    28.  
    29. Function Product_Number() As String
    30. Dim Temp1 As String
    31. Dim Temp2 As String
    32. Dim A As String
    33. Dim b As String
    34. Dim C As String
    35. Dim d As Integer
    36. Dim E As Integer
    37.  
    38.  
    39. Temp1 = mHardDrive.Serial
    40. [B]‘mHardDrive.Serial   Here we include a module that showing the serial number of the hard disk and we are using this serial number for making the product id.[/B]
    41. A = Left(Temp1, 1)
    42. b = Right(Temp1, 1)
    43.  
    44. d = 1
    45. For I = 1 To Len(Temp1)
    46.    If IsNumeric(Mid(Temp1, I, 1)) Then
    47.         E = Mid(Temp1, I, 1)
    48.         If E = 0 Then E = 3
    49.         d = d * E
    50.     End If
    51. Next
    52.  
    53. Temp2 = "Product" + A + b + CStr(d)
    54. Product_Number = Temp2
    55. End Function
    56.  
    57. Function Serial_Number2(P As String) As String
    58. [B]‘This is the final function that taking the product id as input and returning the  serial number as the out put.[/B]
    59. Dim Temp1 As String
    60. Dim Temp2 As String
    61. Dim A As String
    62. Dim b As Integer
    63. Dim C As Integer
    64. Dim d As Integer
    65.  
    66. Temp1 = P
    67.  
    68. d = 1
    69. For I = 1 To Len(Temp1)
    70.     If IsNumeric(Mid(Temp1, I, 1)) Then
    71.         b = Mid(Temp1, I, 1)
    72.         If b = 0 Then b = 3
    73.         d = d + b
    74.     Else
    75.         A = A + Mid(Temp1, I, 1)
    76.         b = Asc(Mid(Temp1, I, 1))
    77.         d = d + b
    78.     End If
    79. Next
    80. C = d
    81.  
    82. d = d + d + d + d
    83.  
    84. Temp2 = "10" + "-" + "85" + "-" + CStr(d) + "-" + CStr(C) + "85"
    85. Serial_Number2 = Temp2
    86. End Function
    87.  
    88.  
    89. 'Now in ur submain
    90. Sub Main()
    91. Call Expire_Project  'Expire the project after 15 days
    92.     If Expire = False Then
    93.         frmLogin.Show
    94.         'Form whish u want to display first
    95.  
    96.    
    97. End If
    98.     If Expire = True Then
    99.     FHelp.Show
    100. 'this form contain the product id and if u enter the serial number then it registerd the project
    101.     End If
    102.  
    103. End Sub

    Any problem please ask....
    comment and feedback and rate are welcome
    shakti............

  12. #12
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Expire The Project After 15 Days

    Save the encoded date as an encoded key name in some program that exists in all versions of Windows.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  13. #13

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Expire The Project After 15 Days

    Save the encoded date as an encoded key name in some program that exists in all versions of Windows.
    explain in brief please

  14. #14

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Question Re: Expire The Project After 15 Days

    Quote Originally Posted by bushmobile
    but the first thing that someone attempting to bypass this would do is check under the registry for any Keys belonging to your app.

    Anyone with any knowledge of the registry could get round it.
    Bush
    Please Explain that what is the batter solution we can implemented in it?

  15. #15
    Frenzied Member litlewiki's Avatar
    Join Date
    Dec 2005
    Location
    Zeta Reticuli Distro:Ubuntu Fiesty
    Posts
    1,162

    Re: Expire The Project After 15 Days

    Hey you are using savesetting to save the values which is a fixed value in registry hive which is \software\vb and vba program settings.Instead choose a random location everytime,encode the keys and values using say the harddisk serial number or timestamp ...
    __________________
    ________________0îîî___
    ___îîî0________(___)____
    __(___)_________) _/_____
    ___\_ (_________(_/______
    ____\_)_________________

  16. #16

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Expire The Project After 15 Days

    Yes i am using the save string for saving the date in the registry, Plese tell what to do it make batter....
    thanks

  17. #17
    Lively Member Nerd-Man's Avatar
    Join Date
    Dec 2006
    Location
    India
    Posts
    119

    Re: Expire The Project After 15 Days

    nice source but once you release a program, then it will go in wrong hands and once it is in wrong hands, it will get cracked. i have seen hard expensive protection get crack. so it would be nice if you can add a web protection to it so that even if the program get cracked, you can still be able to deactivate the program using the web activation like the one KeyBuster from www.keybuster.com. they will give you key that can be use by your application and it will check for the key everytime they run your program. so if they share the key with other peoples, then you can quickly deactivate the program and issure a another key. this is the most effective way that i have seen many programmers are using. i have seen a proxy leecher and the programmer use this protection and i haven't seen a crack version of the proxy grabber. so i think web base protection are better as it give you full power to deactivate your programs at anytime you want.

  18. #18

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Thumbs up Re: Expire The Project After 15 Days

    New One
    VB Code:
    1. Private Sub Expire_Project()
    2.  
    3. str = GetSetting("HKey_Lib_Main", "Exp_Classes", "INTValue") 'First Get the Value from the Registry
    4.  
    5. If Len(Trim(str)) < 1 Then 'If the Registry Value is not set then Set the Value
    6.  
    7.     Call Convert_Into_Letters(Format(Date, "dd-mm-yyyy")) 'Convert Digits into Letters
    8.        
    9.     SaveSetting "HKey_Lib_Main", "Exp_Classes", "INTValue", StartDate
    10.    
    11.     expDate = DateAdd("d", 15, Date) 'Add 15 days to the Current Date
    12.    
    13.     Call Convert_Into_Letters(Format(expDate, "dd-mm-yyyy")) 'Convert Digits into Letters
    14.        
    15.     SaveSetting "HKey_Lib_Main", "Exp_Classes", "EXPValue", StartDate 'Here I have Given 15 days for expiration of the Software You can Give 'n' no of days as you like
    16.    
    17. Else
    18.     str1 = GetSetting("HKey_Lib_Main", "Exp_Classes", "USD") 'If this Registry Value is not Set then
    19.         If Len(Trim(str1)) < 1 Then
    20.             str = GetSetting("HKey_Lib_Main", "Exp_Classes", "INTValue") 'Get the Previously set Initial Value from the Registry
    21.                            
    22.             Call Convert_Into_Digits(str) 'Convert Letters Into Digits
    23.                            
    24.             initialDate = CDate(ExpiryDate)
    25.            
    26.             str2 = GetSetting("HKey_Lib_Main", "Exp_Classes", "EXPValue") 'Get the Exp_Classes Value from the Registry
    27.                        
    28.             Call Convert_Into_Digits(str2) 'Convert Letters Into Digits
    29.                        
    30.             expDate = CDate(ExpiryDate)
    31.            
    32.             If Date > expDate Or Date < initialDate Then 'Compare Registry Values with the Date, if they are bound with in the Initial Value of the Software and Exp_Classes Value of the SOftware then only the Program will run
    33.                 SaveSetting "HKey_Lib_Main", "Exp_Classes", "USD", "True" 'Now set the USD value to True
    34.                 MsgBox "Software Has Been Expired; You cannot run the Software by Setting the Date Backwards", vbExclamation, "Software Expired"
    35.                 Expire = True
    36.                 Exit Sub
    37.             End If
    38.         Else
    39.             MsgBox "Software Has Been Expired; You cannot run the Software by Setting the Date Backwards", vbExclamation, "Software Expired"
    40.             Expire = True
    41.             Exit Sub
    42.         End If
    43. End If
    44.  
    45.  
    46. End Sub
    47.  
    48. Private Sub Convert_Into_Letters(ByVal SDate As String)
    49.  
    50. StoreDate = Format(SDate)
    51.  
    52. StartDate = ""
    53.  
    54.     If Len(StoreDate) > 0 Then
    55.         For I = 1 To Len(StoreDate)
    56.             Select Case Mid(StoreDate, I, 1)
    57.                 Case 1: StartDate = StartDate + "F"
    58.                
    59.                 Case 2: StartDate = StartDate + "L"
    60.                
    61.                 Case 3: StartDate = StartDate + "A"
    62.                
    63.                 Case 4: StartDate = StartDate + "Z"
    64.                
    65.                 Case 5: StartDate = StartDate + "K"
    66.                
    67.                 Case 6: StartDate = StartDate + "T"
    68.                
    69.                 Case 7: StartDate = StartDate + "H"
    70.                
    71.                 Case 8: StartDate = StartDate + "V"
    72.                
    73.                 Case 9: StartDate = StartDate + "P"
    74.                
    75.                 Case 0: StartDate = StartDate + "X"
    76.                
    77.                 Case "/": StartDate = StartDate + "Q"
    78.                
    79.                 Case "-": StartDate = StartDate + "J"
    80.                
    81.                 Case "\": StartDate = StartDate + "N"
    82.             End Select
    83.         Next
    84.     End If
    85. End Sub
    86. Private Sub Convert_Into_Digits(ByVal StartDate As String)
    87.  
    88.     ExpiryDate = ""
    89.    
    90.     If Len(StartDate) > 0 Then
    91.         For I = 1 To Len(StartDate)
    92.        
    93.         Select Case Mid(StartDate, I, 1)
    94.        
    95.             Case "F": ExpiryDate = ExpiryDate + "1"
    96.            
    97.             Case "L": ExpiryDate = ExpiryDate + "2"
    98.            
    99.             Case "A": ExpiryDate = ExpiryDate + "3"
    100.            
    101.             Case "Z": ExpiryDate = ExpiryDate + "4"
    102.            
    103.             Case "K": ExpiryDate = ExpiryDate + "5"
    104.            
    105.             Case "T": ExpiryDate = ExpiryDate + "6"
    106.            
    107.             Case "H": ExpiryDate = ExpiryDate + "7"
    108.            
    109.             Case "V": ExpiryDate = ExpiryDate + "8"
    110.            
    111.             Case "P": ExpiryDate = ExpiryDate + "9"
    112.            
    113.             Case "X": ExpiryDate = ExpiryDate + "0"
    114.            
    115.             Case "Q": ExpiryDate = ExpiryDate + "/"
    116.            
    117.             Case "J": ExpiryDate = ExpiryDate + "-"
    118.            
    119.             Case "N": ExpiryDate = ExpiryDate + "\"
    120.            
    121.         End Select
    122.        
    123.         Next
    124.     End If
    125.  
    126. End Sub

  19. #19
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,836

    Re: Expire The Project After 15 Days

    It looks like to me all someone has to do is set the date back on the computer to get around that. I do that with some trial software I have. Some trial software doesn't fall for that. I don't know how they get around it.

    Thanks!

  20. #20

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Thumbs up Re: Expire The Project After 15 Days

    Quote Originally Posted by TysonLPrice
    It looks like to me all someone has to do is set the date back on the computer to get around that. I do that with some trial software I have. Some trial software doesn't fall for that. I don't know how they get around it.

    Thanks!
    If you have some more idea then tell me.
    Welcome

  21. #21
    Hyperactive Member BrendanDavis's Avatar
    Join Date
    Oct 2006
    Location
    Florida
    Posts
    492

    Re: Expire The Project After 15 Days

    You could just set the date back on your computer and bypass that, which is obviously no good.

    What you'd be better off doing is having your app reference the date from an outside source, like a timezone website or something like that. Something that a user can't modify unless they hack the website itself. You could save the original load date in a random file in a hidden location, hide it amongst some random encrypted data. For example, insert the date at a specific character point in the middle of a large paragraph of Lorem Ipsum, and then encrypt it via a custom encryption method, and have your app decrypt the info upon startup and reference that specific point for the date, and then compare that date against the web reference.

    The main problem you might run into is if someone finds the file somehow and deletes it. Then you have no date to reference. The probability of that happening if you hide the file well enough is slim, especially considering most people won't think to look for a file, but rather look through the registry for the date. To avoid the user being able to use the app after the file is deleted, have the app automatically end trial if the file no longer exists.

    It's a crude method, but it's out of the ordinary and it's something most people won't pick up on or figure out right away.
    God put me on this earth to do many great things, and I'm so far behind that I'm going to live forever.

    I'm programming for Windows using a Apple Mac Mini, 1.5Ghz with 512MB DDR RAM. I feel like I'm committing a crime :P

  22. #22
    Frenzied Member I_Love_My_Vans's Avatar
    Join Date
    Jan 2005
    Location
    In the PHP compiler
    Posts
    1,275

    Re: Expire The Project After 15 Days

    For everyone who in this thread asked how a user could tell if a program is being writen to the registry.

    The is a program originally writen by SysInternals (how are now owned by Microsoft) that shows a live display of everything being read and writen to a file or the registry, there is a filter system so I can see exactly what notepad.exe is sending and nothing else, from there you can review the evidence to crack the date in the registry.

    http://www.microsoft.com/technet/sys...ssmonitor.mspx
    Last edited by I_Love_My_Vans; Aug 11th, 2007 at 02:23 AM.

  23. #23

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Expire The Project After 15 Days

    This code is based on adding the detail in the registry! in the post 18 i change some code that encrypt , i encrypt it using
    a,b,c,d

    you can change the code there!

    Can you tell your client that i add the code in the registry for expire the project i think no and never!

    so how he/she know

    if any one has other best idea for this the welcome!

  24. #24
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Expire The Project After 15 Days

    Yeah, as someone already said, there's a program to monitor file/registry access by programs. I never knew of the new one but I've used RegMon and FileMon.

    shakti5385 - The first place crackers usually look is the registry. If not there, the file system. With programs like the ones I mentioned it's even easier. Or simple hex edits in the EXE to bypass if/then statements. Or even more, modifying the values stored in memory to "fool" the program.

    The only question is whether or not your program is worth the trouble of doing that.

    What you should do is just not have your program even run at all if that registry value or file doesn't exist. If a user wants to try and crack a program by changing/deleting stuff then it's his fault if he can no longer use the program without reinstalling.

    However, re-installing could just reset the trial period. It would be much easier (but a little less convenient for some users) if you required internet access during the install process. They have to use the internet anyway to download your software.

    Keep track of the use of your program via unique IDs found on the computer: hard drive serial, whatever. When they re-install, poll the server to see if they have already installed by checking their IDs against the ones in your database. If they have, don't proceed with the install.

    You can also be sneaky and do this same process when they click something like "Check for updates", because that will require internet access anyway.

    Just an idea...

    Edit: If you do collect information like this, make sure to state it in your EULA (End User License Agreement) and/or TOS (Terms of Service). Just to be fair to the user and prevent any legal issues.

  25. #25

    Thread Starter
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Expire The Project After 15 Days

    Quote Originally Posted by DigiRev
    However, re-installing could just reset the trial period. It would be much easier
    this will not happen in this code

  26. #26
    Addicted Member _RaJ_'s Avatar
    Join Date
    Apr 2008
    Location
    India!
    Posts
    198

    Re: Expire The Project After 15 Days

    but ur code can be cracked easilly !!

    ●════════════════════════════◄►═════════════════════════●
    ___itš bεttεг tΘ bε απ Θρεπ šiππεг, thαπ α ƒαlšε šαiπt___
    ●════════════════════════════◄►═════════════════════════●
    гαj

  27. #27
    Member
    Join Date
    Feb 2008
    Posts
    37

    Re: Expire The Project After 15 Days

    ...or you could use ActiveLock which deals with all the issues noted here and also the issue of the date/time being moved and, its free!!

    Just a thought....

  28. #28
    New Member
    Join Date
    Nov 2018
    Posts
    1

    Re: Expire The Project After 15 Days

    Quote Originally Posted by shakti5385 View Post
    if any one able to change in the registry then he can do any thing.....
    but tell me one thing that how the client know that this software saving the date in the registry....

    this is u know and i know

    check and change tha date see what happen....

    It is working perfectlly here......
    Quote Originally Posted by shakti5385 View Post
    Hi all
    There is a big problem to uninstall the software after some days… There are many method but
    I think that this is the simplest and secure method
    So all u please check it and tell….
    How it is

    VB Code:
    1. Private str As String
    2. Private str1 As String
    3. Private str2 As String
    4. Private initialDate As Date
    5. Private expDate As Date
    6. Private usedDate As Date
    7. Private Expire As Boolean
    8.  
    9. Sub Main()
    10.     Call Expire_Project
    11. End Sum
    12.  
    13.  
    14. Public Sub Expire_Project()
    15. str = GetSetting("Project Name", "Expiry", "Initial Date")
    16. 'First Get the Value from the Registry
    17.  
    18. If Len(Trim(str)) < 1 Then
    19. 'If the Registry Value is not set then Set the Value
    20.     SaveSetting "Project Name", "Expiry", "Initial Date", Date
    21.     expDate = DateAdd("d", 15, Date)
    22.     'Add 15 days to the Current Date
    23.     SaveSetting "Project Name", "Expiry", "Expiry Date", expDate
    24.     'Here I have Given 15 days for expiration of the Software You can Give 'n' no of days as you like
    25. Else
    26.     str1 = GetSetting("Project Name", "Expiry", "Used Date")
    27.     'If this Registry Value is not Set then
    28.     If Len(Trim(str1)) < 1 Then
    29.         str = GetSetting("Project Name", "Expiry", "Initial Date")
    30.         'Get the Previously set Initial Value from the Registry
    31.         initialDate = CDate(str)
    32.         str2 = GetSetting("Project Name", "Expiry", "Expiry Date")
    33.         'Get the Expiry Value from the Registry
    34.         expDate = CDate(str2)
    35.             If Date > expDate Or Date < initialDate Then
    36.             'Compare Registry Values with the Date, if they are bound with in the Initial Value of the Software and Expiry Value of the SOftware then only the Program will run
    37.                 SaveSetting "Project Name", "Expiry", "Used Date", "True" 'Now set the Used Date value to True
    38.                 MsgBox "Software Has Been Expired; You cannot run the Software by Setting the Date Backwards", vbExclamation, "Software Expired"
    39.                 Expire = True
    40.                 Exit Sub
    41.             End If
    42.         Else
    43.             MsgBox "Software Has Been Expired; You cannot run the Software by Setting the Date Backwards", vbExclamation, "Software Expired"
    44.             Expire = True
    45.             Exit Sub
    46.         End If
    47. End If
    48. End Sub

    check It Out....

    Shakti Singh Dulawat


    thanks..
    Can anyone tell me how to change again the expirydate...my code has struck...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width