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

Threaded View

  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.

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