matlabshared.supportpkg.setSupportPackageRoot

Set root folder of support packages

Description

example

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.

Examples

collapse all

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

matlabshared.supportpkg.setSupportPackageRoot('C:\MATLAB\CustomSupportPackageRoot')

Use getSupportPackageRoot to check that the change was successful.

matlabshared.supportpkg.getSupportPackageRoot
ans =

C:\MATLAB\CustomSupportPackageRoot

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.

Note

The folder path cannot contain any space characters.

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

Data Types: char

Introduced in R2016a