A colleague's %TEMP% environment variable has this value:

C:\Users\his.name\AppData\Local\Temp; C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v78\runtime\win32; C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v713\runtime\win32

Note how it contains three semicolon-separated paths, whereas one would normally expect it to contain just one path (by default, the first of those three). We have no idea how this happened. Maybe the Matlab installer... we don't know.

Now, this is causing me trouble because an internal application that I wrote and that the whole company is using tries to get the path of the temp folder, but gets confused because the value of TEMP isn't a valid path (because as we can see it's actually three paths).

The question is thus:

  • Is there a reason to have the TEMP environment variable contain more than one path?
  • Is this supported behavior or is this a bug?
  • Is it safe for my colleague to just remove those two weird Matlab paths from TEMP and keep only the first one?

1 Answer 1


It does seem as if Matlab accidentally appended to TEMP instead of PATH. Given that there are plenty of programs which assume TEMP is a single directory rather than a list, I would recommend removing the extra directories.

If these directories exist and contain Matlab executables, you might want to add them to the PATH.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .