using System() with administrator privilages

조회 수: 39 (최근 30일)
Edward
Edward 2013년 10월 17일
댓글: Jan 2017년 12월 10일
I am trying to create a shortcut using the system(command); command but i am getting output:
You do not have sufficient privilege to perform this operation.
How can i call system with administrator privileges to avoid this?

채택된 답변

Jan
Jan 2013년 10월 17일
See "runas" under Windows and "sudo" under Linux/Mac.
  댓글 수: 3
Jan
Jan 2013년 10월 17일
@Edward: It is your turn to be more precise. I asked in your other thread already, what kind of "shortcut" you mean, but I'm still waiting for an answer. Now it seems, like you have found a solution, so it would be useful to show it. Perhaps administrator privileges are even not enough, but you need the System level to create the wanted object.
The usage of the Windows command runas does not belong to the field of Matlab anymore. Therefore I recommend to ask an internet search engine at first for "Windows runas", and if this does not help, ask in a Windows forum.
Edward
Edward 2013년 10월 17일
I meant a soft/symbolic link shortcut using the command:
system(['mklink "' shortcut_destination '" "' file_location '"']);
I fixed the problem by closing MATLAB and reopening it with administrator privileges. (right click matlab -> run as administrator).

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

raym
raym 2017년 5월 6일
This also solved my problem. Thanks Edward.
I fixed the problem by closing MATLAB and reopening it with administrator privileges. (right click matlab -> run as administrator).

Fatima Abdulhakim
Fatima Abdulhakim 2017년 12월 10일
my matlab is not opening.what i have to do?
  댓글 수: 2
Walter Roberson
Walter Roberson 2017년 12월 10일
Contact Mathworks for free installation assistance
Jan
Jan 2017년 12월 10일
@Fatima: Please do not hijack a thread by posting a new question in the section for answers. Open your own thread instead. If you do so, add any details: Did it work before? How do you try to open it? Which messages do you get?
Please remove this pseudo-answer after you have created your own question. Thanks.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by