How to solve "There was a problem sending the command to the program."

Hi,
I installed MATLAB version 2021b on Windows 7 Service Pack 1 (64-bits).
when I try to double clicking an MATLAB m-file and open it, system gives the error "There was a problem sending the command to the program."
How to solve "There was a problem sending the command to the program."?
Thanks.

1 Comment

Does MATLAB open from the Start Menu? If so, you can navigate to the location of your M file in MATLAB and edit the M file in MATLAB to open it.

Sign in to comment.

Answers (1)

This is a file association problem for MATLAB on Windows. A potential solution is the "MATLAB File Association Fix" available on File Exchange. Users report it resolves the issue by writing a Windows registry file. You can try it here:
If this doesn't work, consider these alternatives:
Solutions for MATLAB R2014a and earlier:
1. Launch MATLAB and try opening the MATLAB code files from the MATLAB GUI.
2. Follow the below steps:
- Right-click on the MATLAB icon.
- Click on properties.
- Go to the compatibility tab and select “Run this program in compatibility mode” and then select the appropriate OS.
3. Upgrade to a version more recent than R2014b.
For MATLAB R2014b and later:
Manually select the MATLAB executable in the bin subfolder as the executable to run when selecting .m files. This has been reported on R2015b for Windows 10.

Categories

Products

Asked:

on 8 Mar 2022

Answered:

on 9 Apr 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!