If you have this in the config:
<appSettings>
<add key="SomePath" value="%TEMP%"/>
</appSettings>
Then from code you'd do something like:
string path = ConfigurationManager.AppSettings["SomePath"];
string fullPath = System.Environment.ExpandEnvironmentVariables(path);