This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Set root folder of support packages





matlabshared.supportpkg.setSupportPackageRoot(installDir) sets the root folder of the current support packages. Support Package Installer installs all support packages to this location.

You must have administrative privileges on the folder that you set the root to. You must also have administrative privileges to modify matlabroot, because the root folder of the support package is recorded under matlabroot.

When you change the root folder, support packages installed in the new location become available on the MATLAB path. Any previously installed support packages are removed from the MATLAB® path, but the files are still available.


collapse all

Use the setSupportPackageRoot function to change the installation folder for support packages. You need administrative privileges to use this function.


Use getSupportPackageRoot to check that the change was successful.

ans =


Input Arguments

collapse all

Root folder of support packages, specified as a string. By default, the directory is set to:

  • Windows – 'C:\MATLAB\SupportPackage\release'

  • For Unix – '/home/user/Documents/MATLAB/SupportPackages/release'

Here, release is your specific MATLAB release and user is your Unix user name. If the default location exists and is not empty, the location becomes release_num.


The folder path cannot contain any space characters.

Example: 'C:\MATLAB\SupportPackage\R2016a'

Data Types: char

Introduced in R2016a