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:
Private str As String Private str1 As String Private str2 As String Private initialDate As Date Private expDate As Date Private usedDate As Date Private Expire As Boolean Sub Main() Call Expire_Project End Sum Public Sub Expire_Project() str = GetSetting("Project Name", "Expiry", "Initial Date") 'First Get the Value from the Registry If Len(Trim(str)) < 1 Then 'If the Registry Value is not set then Set the Value SaveSetting "Project Name", "Expiry", "Initial Date", Date expDate = DateAdd("d", 15, Date) 'Add 15 days to the Current Date SaveSetting "Project Name", "Expiry", "Expiry Date", expDate 'Here I have Given 15 days for expiration of the Software You can Give 'n' no of days as you like Else str1 = GetSetting("Project Name", "Expiry", "Used Date") 'If this Registry Value is not Set then If Len(Trim(str1)) < 1 Then str = GetSetting("Project Name", "Expiry", "Initial Date") 'Get the Previously set Initial Value from the Registry initialDate = CDate(str) str2 = GetSetting("Project Name", "Expiry", "Expiry Date") 'Get the Expiry Value from the Registry expDate = CDate(str2) 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 Expiry Value of the SOftware then only the Program will run SaveSetting "Project Name", "Expiry", "Used Date", "True" 'Now set the Used Date value to True MsgBox "Software Has Been Expired; You cannot run the Software by Setting the Date Backwards", vbExclamation, "Software Expired" Expire = True Exit Sub End If Else MsgBox "Software Has Been Expired; You cannot run the Software by Setting the Date Backwards", vbExclamation, "Software Expired" Expire = True Exit Sub End If End If End Sub
check It Out....
Shakti Singh Dulawat![]()
thanks..![]()




There are many method but
Reply With Quote