Score:-1

Windows 10: How to view another user's enviormental variables

bj flag

I know how to check my enviormental variables and change them.

But how can I view the enviormental variables of another user on the same PC?

br flag
Be a machine admin - why would you try to do that any other way - what are you trying to achieve here? Can you not just look at it via your machine management tools and/or group-policies?
Patrick G avatar
bj flag
@Chopper3 so long story short. We have program that pulls from your user's enviormental variables and pushes them to common registery values for the entire system. The servers registery values keep getting jacked up. I am suspicious on who on the team has the incorrect enviormental variables and keeps jacking up the common registery values.
Patrick G avatar
bj flag
@Chopper3 so yes I am a system admin. And I want to view another user's enviormental variables to see if he is the cluprit for jacking up our registery values. You mentioned machine managment tools and/or group-policies, can you share more detail?
Score:3
cn flag

The manual way would be to load the User's registry hive into Regedit.exe.

Select the HKEY_LOCAL_MACHINE hive in the tree.

in the File menu Load Hive, then select:

C:\Users\username\NTUSER.DAT

It seems, this does not work while the user is logged on to the machine.

give the hive a name such as joe

His environment variables are under:

Computer\HKEY_LOCAL_MACHINE\joe\Environment

When you are done, unload the hive.

Select it in the tree and choose Unload Hive... from the file menu.

If you have many users to check, using the command line may be better, look into

 reg.exe /LOAD ...
Patrick G avatar
bj flag
Hey Peter. That was exactly what I needed. I noticed that this question received a bad review. How else should I have worded this question to not receive a poor review on it?
cn flag
@PatrickG the only reason for a down-vote I can think of is that the question is not really about Enterprise computer, so it may be been better asked on superuser.com. Plus I'm sure the way I describe here can be found elsewhere on the internet, so a search should have gotten you the solution.
cn flag
Here's an example of reading it in .NET. You can get all the "explorer.exe" processes, find the one for the identity you need, then use this code to parse the environment variables. https://github.com/gapotchenko/Gapotchenko.FX/tree/master/Source/Gapotchenko.FX.Diagnostics.Process#readenvironmentvariables https://blog.gapotchenko.com/eazfuscator.net/reading-environment-variables
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.