2021年2月2日星期二

How can I get current value of a Windows environment variable from a different session

Using C# with .Net 4+ or Standard 2.0 or Windows API, I would like to get the value of an environment variable for all users that are logged in, let's call the variable "Identifier". The variable for these sessions is set programmatically (by code I don't control) after they log in. The "Identifier" can be different each time they log in.

How can I get the current value of the "Identifier" environment variable from a session other than the one my process is running under, or is it not possible?

https://stackoverflow.com/questions/66020664/how-can-i-get-current-value-of-a-windows-environment-variable-from-a-different-s February 03, 2021 at 11:05AM

没有评论:

发表评论