سؤال

I'm new to working with Matlab and I've spent the day trying to get Matlab to interact with my C# application. As it stands I can send commands using the MLapp interface like so:

MLApp.MLApp matlab = new MLApp.MLApp();

My problem is when I try execute a command to save data:

string result = matlab.Execute(inputVectorCommand);
            matlab.Execute("save('saveTest.mat','x')");

I get the following error:

Error using save
Unable to write file ytest.mat: permission denied.

I believe this is as the instance of Matlab is created with the highest UAC. Does anybody know a solution for this problem?

هل كانت مفيدة؟

المحلول

It is probably the Windows security feature known as User Interface Privelage Isolation. This is where a lower integrity process is not allowed to communicate with a higher integrity process.

This was added to Windows Vista to prevent what's known as a Shatter Attack.

The security concern is that a malicious application can try to communicate with an elevated MatLab process, possibly using it to write to secure locations.

For example, your C# application is attempting to use MatLab in order to save files on the hard drive.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top