Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?
share|improve this question
add comment

1 Answer

up vote 4 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
1  
A similar error was reported here: connect.microsoft.com/VisualStudio/feedback/details/736607/… It is definitely an error to have tmp/temp paths with multiple directories. –  Axel Kemper Apr 2 '13 at 20:16
add comment

Your Answer

 
discard

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.