I have a requirement where based on an account type selected an environment variable will be set which will be later used by one of my library to store a log file. Though the environment variable is set when I manually check the system, but reading through code gives me empty value. Hence the log is not generated in the path.

I have read that environment variables require reboot in order to read through ReadENVStr. All the above process occurs while running installer. Hence I cannot reboot. Please help!!

I have a custom page which has 2 radio buttons. And based on the radio button selection, Install Dir is set to C:\Program Files or LocalAppData folder. And this value is set to Environment Variable . Later as I proceed in one of the custom pages, I am starting a background worker, which then writes a log file to the path read from Environment variable