uses regitry
var
reg:Tregistry;
reg:=Tregistry.create;
reg.rootkey:=hkey_current_user;
reg.openkey('software/odbc/odbc.ini');
reg.createkey('aaa');
reg.writestring('database','mydb');
reg.writestring('driver','c:/windows/system/sqlserver32.dll');//记不清了
reg.writestring('server','(local)');
reg.writestring('lastuser','me');
reg.openkey('software/odbc/odbc data source');
reg.writestring('aaa','sql server');
reg.free;