Search code examples
windowsmatlabpermissionsmatlab-deployment

C: drive access permission in windows 7


In matlab, I used a windows standalone application. There is a line in this application that writes a file in C:\...\...\. When I run the output exe file produced from this windows standalone application, the exe doesn't write in C:\...\...\ neither tells me that there is a security issues in that partition. All the execution does is nothing. But, when I right-click and run the exe as administrator, it runs correctly.

I want to do it without right-click and run as administrator. Are there is a command in matlab that can do that?


Solution

  • If you create a shortcut to your application, you can go to the Properties of the shortcut, click on Advanced in the Shortcut tab, and select "Run as administrator". That way, whenever you start the application from the shortcut it will be run as an administrator.

    (Disclaimer: applications really shouldn't "foul their own nest" by writing into Program Files. This is bad design.)