lowndrul
lowndrul

Reputation: 3815

Where is `USERPROFILE` on Vista32?

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?

Upvotes: 0

Views: 584

Answers (2)

Anders
Anders

Reputation: 101756

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.

Upvotes: 0

M'vy
M'vy

Reputation: 5774

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

Upvotes: 1

Related Questions