Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

C:\Users\\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?
share|improve this question
up vote 6 down vote accepted

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.

share|improve this answer
A similar error was reported here:… It is definitely an error to have tmp/temp paths with multiple directories. – Axel Kemper Apr 2 '13 at 20:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.