Seems way too complicated...

In the beginning of your script, just add
$CfgFile = @SCRIPTDIR + 'RS_Config.ini'
and replace each
$SomeVar = 'xxx'
with
$SomeVar = ReadProfileString($CfgFile, 'CONFIG', 'SomeVar')

Sorry if that wasn't clear yesterday - the varnames in the INI file can be descriptive, or even match the varnames in the script to keep things very simple, just without the "$".

Glenn
_________________________
Actually I am a Rocket Scientist! \:D