How do I set restrictions on which users can execute my MATLAB Compiler generated standalone application?

3 views (last 30 days)
I have created a standalone application using the MATLAB Compiler. I would like to distribute it to an exclusive set of users who have access to the machine on which it is located.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 22 Jan 2010
There are various options for setting restrictions on users who can execute MATLAB Compiler generated standalone applications on the deployment machine:
1. The standard operating system file access settings can be used to restrict certain users from reading and executing the application on the deployment machine. For example, on a Windows XP machine, perform these steps:
a. Right-click on the file, and select "Properties".
b. In the "Security" tab, add the appropriate users and specify permissions for each of them.
Refer to the support documentation for the deployment machine's operating system for further assistance with this.
2. Include the MATLAB command INPUT in the MATLAB code to request the user to enter a password.
For more information on this command, type
DOC INPUT
at the MATLAB Command Prompt.
For example, you can add the following code to the MATLAB file that is being compiled:
passin = input('Enter password\n', 's');
if (strcmp(passin, 'pass')==0)
disp('wrong password');
return
end
% else, continue with the rest of the code

More Answers (0)

Categories

Find more on Manage Products in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!