473,651 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Best way to check for trial expiration

Does anyone have solid code for setting up a 30 day experiation timer
on your software.

-Peter

Nov 21 '05 #1
4 3114
pe***@mclinn.co m wrote in news:1103315019 .972162.49750
@z14g2000cwz.go oglegroups.com:
Does anyone have solid code for setting up a 30 day experiation timer
on your software.


Check out ActiveLock 2.0:

http://activelock.sourceforge.net/

Best part - it's free!

--
Lucas Tam (RE********@rog ers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 21 '05 #2
I can't give away code because it's for a commercial client however I
recently did a system that uses a LicenseProvider derived object to enable a
class to run within a 30 day limit.

I used a specially coded string such as:

"This is my uncrackable code string for Friday December 17 2004"

In fact the string has a bunch of stuff in it that is encrypted in the
application and used for licensing my code but you get the picture. I use
this string to create a hash-key using MD5 encryption which I store in a
config file.. I also store the install date in plain text in the config file
local to the app.

In the LicenseProvider I reconstruct my string from details I know, add the
stored date to the end and then create an MD5 hash with it. If it's the same
as the stored hash I know that the licensing rules I chose were valid *and*
that the install date is also valid. If the user attempts to extend the demo
period by altering the date the hash key is different and the licensing
fails anyway.

If my licensing succeeds, ie if I have the right install date, I can then
decide whether this code times out after 30 days and refuse to return a
valid license if it does.

I think it's very important that you obfuscate your object with a good
obfuscator that encrypts strings. I use Xenocode becase it will also crash
IL disassemblers. This hides the internal information I use to decide my
licensing policy.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

<pe***@mclinn.c om> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
Does anyone have solid code for setting up a 30 day experiation timer
on your software.

-Peter

Nov 21 '05 #3
Nak
Hi Peter,
Does anyone have solid code for setting up a 30 day experiation timer
on your software.


Before committing yourself to making trialware you might want to
consider making a restricted demo instead. This can be achieved using
pre-compile directives, i.e.

#IF (Not DEMOVERSION)
Do full version stuff, this code will not be in the
demo version, it does not get compiled
#ELSE
Display error message and information on upgrading,
this code will not be in the full version, it does not get
compiled.
#END IF

The reason I say this is because you would then end up with 2 versions
of your application, a full version and a demo version, the demo version
would be impossible to change into the full version as the full version code
wouldn't even be compiled into the executable.

If you were to do as Bob Powell suggests you would have to hard code the
expiration date into the application, thus the timer would not start when
the application is first installed. This *may* be an issue to you depending
on how your distributing your application.

If you choose to make a demo and full version you can then implement a
license provider to protect your full version, if no license is available
refuse to run. This makes the licensing fiasco much easier to deal with
than attempting to hide installation dates around the users system which
will always be found.

My personal opinion is that if .NET code is so easily decompiled, you
may as well make that the *only* way a hacker is going to get it working,
make them resort to diving around in thousands of lines of code. I've
implemented licensing in this way and believe it to be most effective, I'm
not distributing "nagware" to the public, which I find highly irritating.

Anyway, just my 2 pence worth.

Nick.
Nov 21 '05 #4
www.aspose.net

it is free

--
Bob Hollness

-------------------------------------
I'll have a B please Bob

<pe***@mclinn.c om> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
Does anyone have solid code for setting up a 30 day experiation timer
on your software.

-Peter

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
7651
by: Joshua Beall | last post by:
Hi All, What is the best way to use a cookie to remember a logged in user? Would you store the username and password in two separate cookies? Should the password be plain text? Hashed? Not there at all? Any feedback would be helpful. Thanks! -Josh
19
10275
by: Ken | last post by:
Hi, I need to modify an existing application that's written in C, C++ and Visual C++ so the application can be released as a time limited trial version, also the modifications must prevent the application from being reinstalled on the same computer after the trial period has timed out. Does anyone know of any C/C++ code that I could use directly or modified to do this?
1
5540
by: sparton | last post by:
hi! can anyone show me how to make an expiration for a certain software where backtracking of dates (i.e. changing the system date) will not nullify the license.. also, the software will have a counter which counts how many times the software is being used.. thanks!!
1
3571
by: Mario Hébert | last post by:
I have a simple C# object(class) that I reference in a <OBJECT classid="mydll.dll#nmsp.Ctrl"> tag of an HTML page generated by ASP.net. In a case where the Enable content expiration isn't checked for my website, i can call a public method of the object via javascript and it's working. When the Enable content expiration(immediately) is effective for my website, i always have a javascript error telling me that the object or the method...
2
2557
by: Naga Kiran | last post by:
Hi I want to set expiration date for my web based application. for eg it has to be worked for 15 days from the date when it was installed. More over i dont want to use system date to check the installed date with current date as because any one can easily change the system date so tha application may work as it is after crossing the 15 days also. Can anybody tell me how to do this one.its very urgent for me.
3
3087
by: larry mckay | last post by:
Does anyone know how to develop or code a timebomb in vb.net that uses either the registry or something else that would be take a fair amount of time to hack. I'm developing an application that I'm trying to prevent users from distributing it after a particular time expires and I do not want for it to be obvious for them to detect the timebomb or how to hack it. *** Sent via Developersdex http://www.developersdex.com *** Don't just...
9
5507
by: Mike Reed | last post by:
I must be having a "senile" day! I cannot recall, nor get to work, code to read a cookie's expiration date/time in an ASP page/VBScript. What am I missing? *** Sent via Developersdex http://www.developersdex.com ***
10
6813
by: Mike9900 | last post by:
Hello, I would like to store application expiration date in a file and store that file in a secure place, so the application can access the file for all the users on that computer. IsolatedStorage is a good technique but it is for the each user only and is not machine level. Registry is not good because the user may not have access permission. Application directory is not good because the file could be deleted and so the...
3
6212
by: Paul H | last post by:
A client wants me to develop a db that he will sell on to other people. He wants to allow them to run the database for 30 days then lock them out if they chose not to buy the database. The database will be an MDE file. A typical scenario might be: 1. The user trials the database and inputs some data. 2. The trial period ends and the user is locked out. 3. The user pays us and we send him an unlock code so that he can reopen the...
0
8352
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8465
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7297
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5612
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4283
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2699
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.