1
I have Mathematica 10.2
and MATLAB R2015a
installed on my computer and unfortunately MATLAB m-files are recognized as Mathematica notebooks by the window.
When I right-click on an m-file and choose open with
, there's no option for MATLAB.
And if I use the option choose default program...
from that context menu, click on Browse
and go through the following path:
C:\Program Files\MATLAB\MATLAB Production Server\R2015a\bin\matlab.exe
It won't be added to the context menu. What can I do to solve the problem?
Did you tick "Always use this program"? – AFH – 2016-04-11T11:53:58.503
@AFH yes i did it – Sepideh Abadpour – 2016-04-11T12:01:05.553
I can't be sure that W7 was the same, but on W10, if you right-click one of the files you want to link then select Properties, the General tab shows the program which opens it with a Change button alongside: this will allow you to select the default program. – AFH – 2016-04-11T12:26:58.427
@AFH yes, there is such option in win7, too but as you see in the picture, MATLAB is not listed and if I click the
– Sepideh Abadpour – 2016-04-11T12:37:55.240Browse
button and go through the path that I mentioned above tomatlab.exe
, it won't be added to the list and I cannot choose itThat is very strange. All I can suggest is to run
explorer
as administrator or to make sure that your internet security software has not locked your settings. – AFH – 2016-04-11T12:42:43.917@AFH windows explorer? how can I find out if the internet security software has blocked the settings? I use
Microsoft Security Essentials
– Sepideh Abadpour – 2016-04-11T13:08:09.1571I have not used MSE much, and I no longer have a system running it, but I would suggest you check the logs first, to see if there were any entries associated with your attempted change. If running
explorer
as administrator doesn't work and you can't find anything in MSE, then you may have to resort toregedit
, but I don't recommend this if you've never used it before: the modifications necessary will depend on existing entries, so it will be difficult to give guidance, and mistakes could damage your system. – AFH – 2016-04-11T13:52:58.660@AFH I've edited my question. Can you please have a look at it? – Sepideh Abadpour – 2016-04-12T04:58:08.023
1Try the following commands in a
cmd
shell:FTYPE matlabfile="C:\Program Files\MATLAB\MATLAB Production Server\R2015a\bin\matlab.exe" "%1"
followed byASSOC .m=matlabfile
. You should then be able to double-click a.m
file and open it in matlab. – DavidPostill – 2016-04-12T11:00:20.743@DavidPostill - Thanks for that comment: I knew about these commands, but I thought their scope was limited to typing file names in
cmd
shells. When I experimented I got errors ifcmd
was not run as administrator, but the associations then worked inexplorer
. It would be a good idea to typeassoc .m
first, so that the original association can be verified as.m=m-file
, allowing it to be restored in the future if necessary. – AFH – 2016-04-12T12:18:24.720@DavidPostill ok, it's fixed. in fact when I run the
cmd
as administrator and typed what you saidmatlab
will be listed in theopen with
window and I can change the default program – Sepideh Abadpour – 2016-04-12T15:39:22.950@AFH see my last comment – Sepideh Abadpour – 2016-04-12T15:39:45.687
1@sepideh Great. I will add an answer ;) – DavidPostill – 2016-04-12T15:40:10.467