Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto creation of ODBC

Status
Not open for further replies.

MCubitt

Programmer
Mar 14, 2002
1,081
GB
Is there a method of automating teh rollout of ODBC Datasources?

Rather than go to all machines and set up teh datasource (Oracle) I'd like to run a script.
 
Sure they are in the registry. Setup one machine then export the settings as a reg file. They are in HKLM\software\odbc.

Jon

There is much pleasure to be gained from useless knowledge. (Bertrand Russell)
 
Jon: Thanks. How can I merge the registry setting into a user's registry within a DOS-batch file or wscript?
 
Easiest way we do is to mail the users the reg file.
Either as .bat or .reg ,of course mail client must not block the attatchment .

//Regards Soaplover
 
Thanks soaplover.

Now a question which is probably a dumb one but hey...

I exported HKLM/SOFTWARE/ODBC/ODBC.INI/ODBC Data Sources/MyODBCName

But the export is at path not field level, so exported are

MyODBCName
AnotherODBCName
SomeoneElsesODBCName

I do not want users to obtain the other two ODBCs from my merge and I do not wnat them to lose any others they have.

If I delete the other two ODBC names and then merge the resultant file, will it literally be a merge (add my single registry line) or a replacement (remove existing)?

If they already had an ODBC called MyODBCName would it replace or error?

Thanks
 
Well, I tried it anyway (He Who Dares, whinges - or something).

It worked as I hoped. Thanks.
 
Yes, you can edit that file.
Yes, it will overwrite an entries with the same name.
The other entries should not matter, they are only settings to connect to an ODBC source. If the source does not exist they cannot connect to it.
In a batch file you put in this line:
start regedit /s F:\folder\filename.REG
Now, this will work in 98, but it might not in XP or 2000 if the policy for regedit is in effect.

Jon

There is much pleasure to be gained from useless knowledge. (Bertrand Russell)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top