How can i add the feature in Matlab GUI Deploytool package that expires the package after specific expiry date. for example i have made a package and giving to user for trial purpose so i want the package to expire after 15 days on user machine.
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
How can i add the feature in Matlab GUI Deploytool package that expires the package after specific expiry date. for example i have made a package and giving to user for trial purpose so i want the package to expire after 15 days on user machine. please help me regarding this. i have successfully made the package (.exe file) in matlab using deploy tool option and now i want to make the package for some trail purpose.
0 Commenti
Risposte (2)
Arthur
il 21 Nov 2012
Probably the most simple way to do this is, is by creating a simple matfile the first time the program runs, which includes the date. Create this file in the userdata directory of the OS. Something like this:
%make path to licence file:
if ispc
userdir = getenv('APPDATA');
elseif ismac || isunix
userdir = getenv('HOME');
end
fname = 'GUIlicence.mat';
licencefile = fullfile(userdir,fname);
if ~exist(licencefile,'file')
%licence file does not exist, create it
dateInstalled = datenum(now);
save(licencefile,'dateInstalled')
else
%licence file exists, load it;
in = load(licencefile);
%check if licence is expired
expireDate = datenum(now) - ****max licence period****;
if in.dateInstalled < expireDate
uiwait(errordlg('Licence is expired'))
%terminate function:
return
end
end
This is quite easy to crack for the end user, though, he just has to delete the license file. But it's a start...
0 Commenti
Jan
il 21 Nov 2012
Modificato: Jan
il 21 Nov 2012
What about inserting such a line:
if now > datenum('15-Dec-2012'), return; end
Then the user can still reset the clock, but there is no fair method to block this.
Another method is to check the existence of a certain webpage and delete it when the license expires. Then the internet traffic can be observed and the existence of the page can by simulated with less than half an hour of work. An encrypted communication with a webserver would be more secure. But remember, that such dongles are hated by users, because they block the trial software in case of tiny net connection problems already. This is not a good advertisment.
A big red banner on top of the figures might me better: If the evaulation tome has expired, show a large "THIS IS A TRIAL VERSION ONLY" string in the figures. The user can still run the software such that he does not feel to be foreced to cheat. But the motivation to pay is higher.
0 Commenti
Vedere anche
Categorie
Scopri di più su Startup and Shutdown in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!