3
Answers

Environment Variables Return Null

Photo of Bryan

Bryan

15y
19.1k
1
I'm having a problem where my program is returning null for environment variables that my installer is setting. I checked the Advanced settings of the computer, and the variable values are all correct, but inside my program the values are returning null.

I'm using the following code to store the value: string envirVar = System.Environment.GetEnvironmentVariable("InstallUser");

Can anyone help?

Answers (3)