MATLAB starting up in C:\Windows\system32

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.

5 Kommentare

dpb
dpb am 11 Dez. 2013
Did you somehow manage to lose matlabrc.m?
Matt J
Matt J am 12 Dez. 2013
Bearbeitet: Matt J am 12 Dez. 2013
No, I can find it fine with
>>which matlabrc
However, in case it sheds any light, I tried doing
>>restoredefaultpath, savepath
and this failed with the message
Warning: Unable to save path to file 'C:\Program Files\MATLAB\R2011a\toolbox\local\pathdef.m'. You can save your path to a different location by calling SAVEPATH
with an input argument that specifies the full path. For MATLAB to use that path in future sessions, save the path to 'pathdef.m' in your MATLAB startup folder.
> In savepath at 162
dpb
dpb am 12 Dez. 2013
That sounds like a protection/permission problem.
Matt J
Matt J am 12 Dez. 2013
I did a complete clean and re-install and it still didn't fix it!
Time to go to Tech Support, I guess...
What does
userpath
return? It might be pointing to 'C:\Windows\system32'

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Matt J
Matt J am 13 Dez. 2013

1 Stimme

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!

Weitere Antworten (2)

Walter Roberson
Walter Roberson am 12 Dez. 2013

0 Stimmen

RunAs administrator, restoredefaultpath, savepath, then exit. After that use it normally.

1 Kommentar

Matt J
Matt J am 12 Dez. 2013
Bearbeitet: Matt J am 12 Dez. 2013
Hi Walter,
Running as admin did get rid of the error savepath was giving me, but after exiting/restarting, I'm still in the system32 directory. My path was already factory default, it looks like.

Melden Sie sich an, um zu kommentieren.

Image Analyst
Image Analyst am 12 Dez. 2013

0 Stimmen

Look at the properties of the MATLAB icon that you click to run it. Is the "Start in" field blank like mine? Or is it C:\Windows\system32?

3 Kommentare

Matt J
Matt J am 12 Dez. 2013
All my "Start in:" fields are blank.
per isakson
per isakson am 13 Dez. 2013
I have a folder name in my "Start in:" field. If Matlab does not find that folder it makes C:\Windows\system32 the current folder.
Matt J
Matt J am 13 Dez. 2013
Bearbeitet: Matt J am 13 Dez. 2013
@per: I assume you mean that when you enter a non-existent folder, this happens. But surely when you make "Start in:" blank, it starts normally.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 11 Dez. 2013

Kommentiert:

am 10 Mär. 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by