I have to work with an ini file, but I need a value set in the file to be based on an environment variable. For example,
... [program] dir=%SystemDrive%\SomeFolder\ ...
In this case, SystemDrive is an environment variable on the machine. The software that reads this ini file is out of my control, but I can see from the error message I get that it read dir as %SystemDrive%\SomeFolder\, instead of the expanded version C:\SomeFolder\.
How do I (or is it possible to) get environment variables to expand when the ini file is read? I don't have access to the code of the program that reads the ini file. However, I'm hoping there is a proper syntax/technique for specifying an environment variable to be expanded.