Where is `USERPROFILE` on Vista32?

故事扮演 提交于 2019-12-25 00:43:22

问题


This is a follow-up question to Where are my environment variables set?. In that post it's mentioned how one can find environment variables using the Windows GUI or RegEdit. What's strange to me is that SET from the command line displays a USERPROFILE=C:\Users\brianjd but it doesn't show up using the Windows GUI or RegEdit methods.

Q: Where is USERPROFILE? Why does it show up using SET but doesn't show up using Windows GUI or RegEdit?


回答1:


I think you may find what you need in HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\ProfilesDirectory

Each user has it's own Profile key as well, which stores the ProfileImagePath (and is set to the same value as %userprofile%)

It may explain why this is not a environment variable that appears in the GUI.

I don't have any source to confirm that sorry. But I had to use this to repair a broken profile last week. Hope it helps.

M'vy




回答2:


I'm guessing it is set by winlogon.exe or userinit.exe when you log in. Clearly, the USER* variables have to be set by the system since domain and profile path can change.



来源:https://stackoverflow.com/questions/5146842/where-is-userprofile-on-vista32

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!