Look under "SetOption()" for NoVarsInStrings and similar.

For good coding practice you would normally set NoVarsInStrings and Explicit ON.

Another way to expand the variable is to use ExpandEnvironmentVars().

In your case you could shorten the code to:
Code:
$ItemPath=ExpandEnvironmentVars(ReadProfileString("$INIPath",$Section,"ItemPath"))



So, why did I show you the Execute() method?

Well, Execute() is very useful for many tricks like this - variable variable names are another one, so it's worth learning.

Another benefit of using Execute() is that you can include KiXtart macros and variables in the ini file as well as environment variables. In fact your ini file could contain mini KiXtart scripts!