Wednesday, 8 April 2015

Mathworks MATLAB R2015a - File Association Fix [x86 & x64]




If you have MathWorks MATLAB R2015a (x86 or x64) installed in your PC then you might be facing file association problem. All your previous MATLAB files won't be associated with new version of MATLAB and the supported file extensions won't be appearing in Default Programs option of Control Panel. Here I am providing you the solution for this problem.


1. First download these files:
  • For 32-bit Users [Download Link (x86)] (This archive contains fileassoc.m, fileassoc.mexw32, fileassoc_mexw32.auth)
  • For 64-bit Users [Download Link (x64)] (This archive contains fileassoc.m, fileassoc.mexw64, fileassoc_mexw64.auth)
Note: These files are created by MathWorks. I just copied them from the previous version (R2014b) and it is working with R2015a.

2. Then Paste these 3 files to this location of your PC.

[YOUR_DRIVE]:\Program Files\MATLAB\MATLAB Production Server\R2015a\mcr\toolbox\matlab\winfun\private

3. Now, open MATLAB R2015a as an administrator and run the following code.

cwd=pwd;
cd([matlabroot '\mcr\toolbox\matlab\winfun\private']);
fileassoc('add',{'.m', '.mat', '.fig', '.p', '.mexw64', '.mlapp', '.mltbx', '.mldatx', '.req', '.mlappinstall', '.mlpkginstall', '.mdlp', '.slxp', '.mdl', '.slx', '.sltx', '.ssc', '.mn', '.mu', '.muphlp', '.xvc', '.xvz', '.sldd', '.slddc', ['.' mexext]});
cd(cwd);
disp('Windows file associations changed. M, MAT, FIG, P, MEXW64, MLAPP, MLTBX, MLDATX, REQ, MLAPPINSTALL, MLPKGINSTALL, MDLP, SLXP, MDL, SLX, SLTX, SSC, MN, MU, MUPHLP, XVC, XVZ, SLDD & SLDDC files are now associated with MATLAB.')

4. Tada! All MATLAB files are associated with the program.


Note: This method is tested by me on Windows 8.1 x64.

Please do provide your feedback.