Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
how to make a time limited stand alone application to distribute for demo purpose?

Subject: how to make a time limited stand alone application to distribute for demo purpose?

From: Vihang Patil

Date: 9 Jan, 2008 07:03:12

Message: 1 of 9

Hello
I need to know whether we can make a stand alone
application which is time bound i.e. An application that
can run for a specific amount of days, say 30 days
evaluation copy. And it should be so that even if the user
changes the the date or goes backward in the date, the
application should not run if the time period is lapsed.
Any suggestions?
Regards
Vihang

Subject: how to make a time limited stand alone application to distribute for demo purpose?

From: Vihang Patil

Date: 11 Jan, 2008 10:42:03

Message: 2 of 9

Any suggestions?

Subject: how to make a time limited stand alone application to distribute for demo purpose?

From: Ian Clarkson

Date: 11 Jan, 2008 14:48:02

Message: 3 of 9

"Vihang Patil" <vihang_patil@yahoo.com> wrote in message
<fm7h5r$2hb$1@fred.mathworks.com>...
> Any suggestions?

The only thing I could think is that if you only supported
versions of MATLAB that could make internet requests (which
I think new ones can?), you could activate the program each
time it tried to run -- call a remote server with a key and
authenticate if your record for that user has not run out.
That way you only need to make sure that the receiving
computer keeps an accurate date. You'd have to be quite
obvious about the fact that you were doing that though -- I
don't think people like it when their computers call out
onto the internet without their knowledge. And it would
also force users to have the internet.

However, given that they could likely see the .m code, I'm
not sure how helpful that would be. Maybe it'd be possible
to make a compiled .mex file instead that would be harder
to open up?

Another thing I just thought of was that you could do a
file search and get the date of the most recently modified
file. Assuming they tried to switch their date back, they'd
have to switch the modified dates on all of their files to
get the software to work? This depends on the fact that
files get modified on the computer. Not sure how well that
would work, but maybe also worth a shot instead of going
the internet route. There is software on the file exchange
for doing file searches. Would also be taxing on the
computer to enumerate all files! Maybe you could find a
specific file that you know gets updated/modified very
often and just reference that one.

Hope this helps!

Subject: how to make a time limited stand alone application to distribute for demo purpose?

From: Vihang Patil

Date: 15 Jan, 2008 05:10:25

Message: 4 of 9

Dear users
After probing into the requirement, I had posted above, I
coded a small program which can be used to serve the above
said purpose. If any one is interested to try out can visit
this page
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=18315&objectType=file

or

tiny url: http://tinyurl.com/yqzpfe

Regards
Vihang

Subject: how to make a time limited stand alone application to

From: Yumnam Kirani Singh

Date: 15 Jan, 2008 06:48:14

Message: 5 of 9

Hi Patil, yours eavluation copy does not work at all! It just shows 0 days left! Are you allowing only for negative numbers of days?

Subject: how to make a time limited stand alone application to

From: Vihang Patil

Date: 15 Jan, 2008 07:15:03

Message: 6 of 9

Yumnam Kirani Singh <kirani.singh@gmail.com> wrote in
message
<14955036.1200379725033.JavaMail.jakarta@nitrogen.mathforum
.org>...
> Hi Patil, yours eavluation copy does not work at all! It
just shows 0 days left! Are you allowing only for negative
numbers of days?

Dear Yumnam
The program is doing exaclty as it is supposed to do,
except it is not "0 days left" but it is "0 days in use".
USAGE :
 function [output days_in_use] = evaluation
(num_of_days,msg_on_off)

ex: [out days_in_use] = evaluation(30,'on');
%30 is number of days, the application will run, 'on' is
%the flag set if you want message to pop up on end of
%evaluation

To check whether the 0 days is increasing or not, just
change the system time to say tomorrow and rerun the above
function and you will see it is incremented to 1. To check
whether it stops functioning after 30 days, change the
clock to 31 days from now and see the result.

P.N: You can use "remove_evaluation.p" to remove the
effect of "evaluation.p" function.

HTH
Vihang

Subject: how to make a time limited stand alone application to

From: Vihang Patil

Date: 15 Jan, 2008 07:27:02

Message: 7 of 9

"Vihang Patil" <vihang_patil@yahoo.com> wrote in message
<fmhmhn$p3q$1@fred.mathworks.com>...
> Yumnam Kirani Singh <kirani.singh@gmail.com> wrote in
> message
>
<14955036.1200379725033.JavaMail.jakarta@nitrogen.mathforum
> .org>...
> > Hi Patil, yours eavluation copy does not work at all!
It
> just shows 0 days left! Are you allowing only for
negative
> numbers of days?
>
> Dear Yumnam
> The program is doing exaclty as it is supposed to do,
> except it is not "0 days left" but it is "0 days in use".
> USAGE :
> function [output days_in_use] = evaluation
> (num_of_days,msg_on_off)
>
> ex: [out days_in_use] = evaluation(30,'on');
> %30 is number of days, the application will run, 'on' is
> %the flag set if you want message to pop up on end of
> %evaluation
>
> To check whether the 0 days is increasing or not, just
> change the system time to say tomorrow and rerun the
above
> function and you will see it is incremented to 1. To
check
> whether it stops functioning after 30 days, change the
> clock to 31 days from now and see the result.
>
> P.N: You can use "remove_evaluation.p" to remove the
> effect of "evaluation.p" function.
>
> HTH
> Vihang


One more thing, I forgot to mention, is that, if you are
executing the demo application , magic_number.m that I
have bundled along to test this application requires a
small utility which is found here
http://www.mathworks.com/matlabcentral/fileexchange/loadFil
e.do?objectId=12673&objectType=FILE
Copy this file in the same folder where your program
resides.
I have modified my posting on the File Exchange also, but
untill then you can use the above said workaround.

Vihang.

Subject: how to make a time limited stand alone application to

From: Sherif Elnabarawy

Date: 21 Dec, 2010 10:32:08

Message: 8 of 9

Great Work , but i still have a problem using it , i need to make my app work on user accounts that are not administrator accounts , it gives me this error :

??? Error using ==> fprintf
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in ==> C:\SIDLAB\License\evaluation.p>evaluation at 71

Error in ==> license_dialogue>activate_Callback at 163
    [out used_days] = evaluation(days,'on')
 
??? Error while evaluating uicontrol Callback

so any help here ?
however ,its a great job this is what i was looking for .
thanks a lot ,
Sherif Elnabarawy.

Subject: how to make a time limited stand alone application to

From: Vihang Patil

Date: 21 Dec, 2010 16:13:21

Message: 9 of 9

"Sherif Elnabarawy" wrote in message <iepvn8$1hs$1@fred.mathworks.com>...
> Great Work , but i still have a problem using it , i need to make my app work on user accounts that are not administrator accounts , it gives me this error :


Yes you are right.
I have checked this problem today on a non administrator account, and I have got a similar error. I need to check for a workaround. Probably will need some time..
Vihang

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us