MATLAB: MATLAB starting up in C:\Windows\system32

corruptedrestoredefaultpathsystem32userpath

I have several MATLAB versions installed on a given computer
  • R2011a (64-bit)
  • R2011b (64-bit)
  • R2012a (32-bit)
  • R2012b (64-bit)
Something changed in the background and now the first three versions above always start up in the C:\Windows\system32 folder, as opposed to my HOME/MATLAB directory.
Furthermore, in the R2012a version, the VER command does not work, giving an error "MEX file entry point is missing"
Error in ver(line 36)
locDisplayMatlabInformation
What might I have done to corrupt things? How do I uncorrupt them?
Thanks.

Best Answer

What does userpath return?
Good call, Suneesh. USERPATH returned an empty string. By doing
userpath('reset')
everything is back to normal now.
I still wonder if anyone has any ideas why restoredefaultpath() didn't accomplish the same thing. And, of course, why re-installing didn't fix it as well!