Troubleshoot Licensing Errors in MATLAB

Troubleshooting tips

Hard Reset Script

Coe Gwathney created a script that will allow you to nuke and pave the MATLAB config and licensing on a Windows device where MATLAB is being ornery. This is a first step toward getting MATLAB to behave correctly.

The script will:

  • Kill any instances of MATLAB that are running.
  • Wait about five seconds because you have to...
    • Create a stash folder on the desktop to plunk the settings and licensing into.
    • Move aforementioned settings and licensing.
  • Then, when you start MATLAB again, it’ll be in a brand-new state. 

You can download the script here: https://filedrop.uah.edu/fix-muhmatlabpls.ps1

  1. Slap the script onto the customer’s device.
  2. Right-click and run in powershell.
  3. ????
  4. Profit.

Licensing error at first time load

If you receive a licensing error at MATLAB startup, the following steps may help.

  1. Close MATLAB completely. Make sure it’s not running.
  2. In file explorer, navigate to: C:\Program Files\MATLAB\R2023a\licenses
  3. In that directory, you should see a file with file extension “lic”
  4. Either move it to the desktop or delete it.
  5. Start MATLAB
  6. The licensing wizard should find that there is no license file and prompt for licensing.
  7. Log in with your ChargerID and password; then select your license.

Licensing error after MATLAB had previously worked 

If you were not experiencing a problem before but the license file becomes corrupted, please do the following.

  • Close MATLAB completely. Make sure it’s not running.
  • In file explorer, navigate to: %AppData%\MathWorks\MATLAB\R2023a_licenses
  • In that directory, you should see one or more files with file extension “lic”
  • Move them to the desktop.
  • Start MATLAB
  • The licensing wizard should find that there is no license file and prompt for licensing. 
  • Log in with your ChargerID and password; then select your license. 
  • Delete the files you moved to the desktop. 

When to use this?

Using the script or troubleshooting steps above may resolve the following issues:

  • Matlab loads to a blank/white screen and halts (or crashes) 
    • The script works in this case because it nukes everything in the app data directory for the application: licensing info, config, app data, cached data, et cetera.
  • Matlab boots, but screams "license checkout failed”
    • The script works in this case because it will delete the locally-generated license file (and thus reset the licensing status of the application)
  • Matlab does not load at all. When you launch the app, you briefly get a loading indicator on your mouse cursor, but nothing happens. 
    • The script works in this case because it resets the entire local config

Details

Article ID: 157479
Created
Tue 8/15/23 7:13 PM
Modified
Wed 8/30/23 9:11 AM

Related Articles (3)

This KB supplies details to answer the question about whether or not researchers can use MATLAB software.
Information provided to OIT from Mathworks in November 2019.