Jump to content

Building evaluation version in LV


Recommended Posts

QUOTE (PaulG. @ Jan 30 2009, 09:59 AM)

Same idea as Paul G, but write the time of the first run into the registry (assuming you are running on Windows). Every time the application starts, check the registry location. If the entry is not there you assume that it is the first run and you write the time/date to the registry. If the entry is already there then check to see how much time has passed, and if it is more than 15 days, exit the application.

To make the registry entry harder to find manually, do not use an obvious name for the key and encode the value (time/date) using some simple algorithm.

Link to comment
  • 2 months later...

QUOTE (LV_FPGA_SE @ Jan 30 2009, 09:44 PM)

Same idea as Paul G, but write the time of the first run into the registry (assuming you are running on Windows). Every time the application starts, check the registry location. If the entry is not there you assume that it is the first run and you write the time/date to the registry. If the entry is already there then check to see how much time has passed, and if it is more than 15 days, exit the application.

To make the registry entry harder to find manually, do not use an obvious name for the key and encode the value (time/date) using some simple algorithm.

I know I am catching up this post after long time actually i was stuck up with some other work, I tried what you said like writing date to registry and then reading it from there but its not working because i can write to registry only in three data type ie DWORD,BINARY and STRING once i write my date and time in any of these fromat I am not able to convert it back to Labview time stamp with same date and time its gives some other junk values so how do i do it...

Link to comment

QUOTE (hooovahh @ Apr 6 2009, 08:46 PM)

You can convert the time stamp to a string then write to the registry. Then convert from string back to time stamp when you read from the registry.

LVexampleflatten.jpg

EDIT: The name of those primitives is Flatten To String, and Unflatten From String

Thanks hooovahh but there are two problems doing this once you see my code you will come to know which I have attached here the first problem is it gives an generic error for first time it runs(this happens bcoz there is no value in register the first time it is read then the value is written and second time it runs smoothly so how to avoid this error first time) and second is how do I add exactly fifteen days to value read from register bcoz its in binary string or time stamp value...

Link to comment

On the unbundle of the error cluster check to see what the error code number is. If the error code is equal to the known error code for having no registry key to read, then clear the error and write to the registry the date plus 15 days.

As for how to calculate what today's date plus 15 days is, take the time stamp and add 1,296,000 to that number (wire the primitive add to the time stamp and add a double with the value of 1,296,000 to it) if you were wondering there are 1,296,000 seconds in 15 days.

Link to comment

QUOTE (hooovahh @ Apr 8 2009, 01:28 AM)

On the unbundle of the error cluster check to see what the error code number is. If the error code is equal to the known error code for having no registry key to read, then clear the error and write to the registry the date plus 15 days.

As for how to calculate what today's date plus 15 days is, take the time stamp and add 1,296,000 to that number (wire the primitive add to the time stamp and add a double with the value of 1,296,000 to it) if you were wondering there are 1,296,000 seconds in 15 days.

Thanks hooovahh now its working I used an error cluster at the end to handle it, it was Generic error 42 not a known error but the most important question is do you think this method really works(initially suggested by PaulG) to create an evaluatiion build by writing system time to registry what if somebody changes the system time I tried it this method completely fails what now... :thumbdown:

Link to comment

QUOTE (manojba @ Apr 7 2009, 11:18 PM)

..what if somebody changes the system time I tried it this method completely fails what now... :thumbdown:

Ultimately you have to evaluate whether the user will actually go to those lengths just to use your evaluation software longterm. Imagine having a production test system and having to manipulate the system date every two weeks just to use some software messing up other applications like databases, spreadsheets etc..!

What is it you are writing that is going to enthuse your users to cheat on paying you?

N.

Link to comment

I sometimes wonder how larger software companies accomplish this. If a piece of software has a 30 day trial and you turn back the clock, some times it will work, but most of the time (not that I've done this alot) it will know you changed the clock.

Does it check the Windows time against the time that the bios says it is? How does it know you changed the time?

If you are concerned that users are going to change the system time, you could just make it more complicated. Like every time the program runs write the current time to the registry (but not in an obvious format you could encrypt it with a system string) and if the new time is before the time in the registry then someone changed the system clock, and the software should exit.

Link to comment

QUOTE (manojba @ Apr 12 2009, 11:51 PM)

Thanks everyone for your usefull suggestions I have found out my own method of tackling this problem and its working fine...

Would you mind giving us some details about how you handled it? After all, the intent of LAVA is to share good ideas. If you found a good way of doing this I am sure others would appreciate hearing about your solution.

Link to comment

QUOTE (Mark Yedinak @ Apr 13 2009, 08:57 PM)

Would you mind giving us some details about how you handled it? After all, the intent of LAVA is to share good ideas. If you found a good way of doing this I am sure others would appreciate hearing about your solution.

In My application I am writing current date + 30 days to registry the first time application runs and then on i just read it from registry every time application runs and check weather current date is more than what is written in registry if it is more than 30 days the application stops all this is fine but when user sets back his system date say 20 days back the application again runs for 20 days so to over come this what i have done is, the day 30 days are over I again write to system registry some time which is so backward like 16/4/1985 user will never think of setting his system time to such a date I know this method maybe funny for some but it works for me... :D

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.