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 commentaires

dpb
dpb le 11 Déc 2013
Did you somehow manage to lose matlabrc.m?
Matt J
Matt J le 12 Déc 2013
Modifié(e) : Matt J le 12 Déc 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 le 12 Déc 2013
That sounds like a protection/permission problem.
Matt J
Matt J le 12 Déc 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'

Connectez-vous pour commenter.

 Réponse acceptée

Matt J
Matt J le 13 Déc 2013
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!

Plus de réponses (2)

Walter Roberson
Walter Roberson le 12 Déc 2013

0 votes

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

1 commentaire

Matt J
Matt J le 12 Déc 2013
Modifié(e) : Matt J le 12 Déc 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.

Connectez-vous pour commenter.

Image Analyst
Image Analyst le 12 Déc 2013

0 votes

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 commentaires

Matt J
Matt J le 12 Déc 2013
All my "Start in:" fields are blank.
per isakson
per isakson le 13 Déc 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 le 13 Déc 2013
Modifié(e) : Matt J le 13 Déc 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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by