Why is a new instance of MATLAB opened when I double-click on a MATLAB file in Windows Explorer even if I have one instance of MATLAB already open on my Windows 7 machine?
Show older comments
I have full administrative privileges on my Windows 7 machine and I run MATLAB as an administrator. I then open a Windows Explorer and double-click on a MATLAB file. I expect the MATLAB file to open in the existing instance of MATLAB, instead another instance of MATLAB is launched, and the MATLAB file opens there in the Editor. If I double-click on another MATLAB file in Windows Explorer, it opens in Editor in the second instance of MATLAB. However, if I close the second instance of MATLAB and then double-click on a MATLAB file in Windows Explorer it will open another MATLAB instance.
I am running MATLAB as an administrator because otherwise I cannot save path from File->Set Path->Save menu. I have User Control Access (UAC) turned on and I cannot turn it off because of security considerations.
Accepted Answer
More Answers (1)
Shahram Bekhrad
on 30 May 2016
Edited: MathWorks Support Team
on 24 Sep 2022
11 votes
Hello. I had the same problem on my win 8.1 and MATLAB but followed thorough with the suggested solution by MathWorks Support Team on top of the page and then followed by the other solution on MATLAB File Association Fix by Patrik Forssén on some other post in the site ( How to restore file association in Matlab 2015a for Windows ) and I think that it is alright now. Now when I double click on a MATLAB associated file IF I have an instance of MATLAB open, It opens the file directly in the editor or MATLAB file importer dialog (depends on the file) and if not it opens an instance of MATLAB and the rest follows.
1 Comment
Naseeb Gill
on 30 Apr 2019
I tried solutions A and B provided by MathWorks Support Team but none works for me. Then I downlaoded MATLAB File Association Fix by Patrik Forssén and my problem get solved like magic. Mine was MatLab R2017b, Windows 10.
Procedure for the same is:
- Downlaod the zip file. MATLAB File Association Fix
- Extract it and run matlab script named associateFiles.m in Matlab. By running this script, a new file with extension *.reg will be generated in same folder.
- Go to folder and double click on this *.reg file. Regisrty will be updated.
- Now restart Matlab.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!