MATLAB: Problem trying to Install *.exe with Matlab ‘system’ command

MATLABsystem exe install

Dear Experts,
I am trying to install and exe file using the system command. The function fails, resulting in a -1 status and no cmd output message.
The command is:
[status,cmdm] = system('D:\dbLNI_Finder.exe')
The file exists:
If I try to perform the same command for the same file but in a specific location (a pen drive) it works:
system('H:\for win\dbLNI_Finder.exe')
I tried to copy and replace the file several times, but no.
Any idea? Thanks!

Best Answer

Although I am the PC admin, the command worked only when I open the Matlab in Admin mode (right-click >> open as adm). Since this code is for a deployed application, my deployed application is also able to install the *.exe only if opened as admin.
Now, why I the 'system' function worked installing the *.exe from the PenDrive (an only from the pen drive) without mode restrictions for me, is a mystery (in terms of security, somewhat contradictory).
At the end, I understood that the system() function and the CMD have distinct permission executing the same command. Good to know.
Tks.
Related Question