Well, thanks to all for your replies. It was just an idea.
Maybe I'll try to implement it someday (minus the Windows Registry part :P)
Just as a note:
I gather that the OPs reference to an IP address was just an example of one possible variable substitution, and what he is really looking for is something more generic that could be used for any kind of substitution in config files. Unfortunaetly, no such thing exists as far as I know.
Yes, this was my intended question!