Setting Net Dir in IDAPI32.CFG

How would one go about programatically changing the BDE config file
IDAPI32.CFG NET DIR to the same as the Data Directory you are using?

I have already tried to do something like :
Session.NetFileDir := datapath;
Session.SaveConfigFile;

But while the SaveConfigFile will save an alias, it will not save the
netdir.

HELP!!!

Peter