Why is MATLAB unable to launch my system browser in R2022b?

When I select 'Getting Started' in the command window and then try to access any video shown on the right of the Help Center, I get the following error:
Warning: MATLAB was unable to launch your System web browser:
'cmd.exe' is not recognized as an internal or external command,
operable program or batch file.
> In web>displayWarningMessage (line 172)
In web (line 114)
I am on On Windows 11 Pro 22H2 (build 22621.755) using either Avast Secure Browser or Microsoft Edge as the default browser. There is no setting in MATLAB preferences which seems to apply to this issue.

 Accepted Answer

First, try adding the explicit path Windows\System32 to the PATH to make all System32 executables work. Then, you will likely need to edit the file “matlab.internal.web.WindowsBrowserHandler”. To do so, type
edit matlab.internal.web.WindowsBrowserHandler
You can explicitly point to cmd.exe on the hard drive by modifying this line:
[stat,output] = dos("cmd.exe /c rundll32 url.dll,FileProtocolHandler """ + url + """");
to:
[stat,output] = dos("C:\Windows\System32\cmd.exe /c C:\Windows\System32\rundll32 url.dll,FileProtocolHandler """ + url + """");
If you are denied permission to edit the file, please go to the file in explorer, right click it and select properties >> security >> <user> >> Edit, and check boxes for modify and write. Then, save the changes and try again.

More Answers (0)

Categories

Products

Release

R2022b

Community Treasure Hunt

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

Start Hunting!