Hi,
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!!
Thanks
How to refresh environment variable without reboot
5 posts
Are you starting a child process that needs the variable?
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 variableOriginally Posted by Anders View PostAre you starting a child process that needs the variable?
Hi Anders,
Do you know whether reboot is necessary for environment variable value to reflect?
Thanks
Do you know whether reboot is necessary for environment variable value to reflect?
Thanks
Take a look on the Wiki. There should be a System::Call example that sets it directly in your process (and children).