Computing.Net > Forums > Database > Command line ODBC Driver Add?

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

Command line ODBC Driver Add?

Reply to Message Icon

Original Message
Name: FrankTheTankWSU
Date: June 28, 2006 at 10:54:48 Pacific
Subject: Command line ODBC Driver Add?
OS: Windows XP
CPU/Ram: 3.0ghz/2gig
Model/Manufacturer: Dell
Comment:

Is it possible to add System DSN data source drivers to ODBC from the Command Line or the do an export/import of your ODBC data source drivers from the command line (a la db2ca's db2cfexp/db2cfimp commands).

I am attemping to write a batch file to automate a client application install, and one of the steps is to add 2 system DSN data source drivers to ODBC, so I need to know how to do this from the command line.

Thank you for any help you can provide,
Francesco Esposito


Report Offensive Message For Removal


Response Number 1
Name: SN
Date: June 28, 2006 at 11:57:14 Pacific
Reply: (edit)

Do you mean the data source drivers (like a db connector or something) or do you mean actual DSNs? System DSNs are just stored in the registry, so it would be easy enough for you to export the registry key and import it as part of the application install. I don't know how to install the actual drivers...That bit probably varies depending on which drivers you're installing.

Good luck,
-SN


Report Offensive Follow Up For Removal

Response Number 2
Name: FrankTheTankWSU
Date: June 29, 2006 at 05:44:05 Pacific
Reply: (edit)

The items found in Control Panel -> Data Sources (ODBC) -> (System DSN Tab), listed under "System Data Sources"


Report Offensive Follow Up For Removal

Response Number 3
Name: SN
Date: June 29, 2006 at 08:21:13 Pacific
Reply: (edit)

OK, then it shouldn't be too hard. Just find the entry you want in HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI in the registry, export it to a .reg file, and import the reg file from the command line using regedit /s.

Good luck,
-SN


Report Offensive Follow Up For Removal

Response Number 4
Name: FrankTheTankWSU
Date: June 29, 2006 at 12:08:07 Pacific
Reply: (edit)

Registry editing is disabled on our systems, is there any other way to do it from the command line?


Report Offensive Follow Up For Removal

Response Number 5
Name: anonproxy
Date: July 11, 2006 at 23:54:23 Pacific
Reply: (edit)

Try the "reg" command. "regini" will process a batch script for you (this comes with the W2k3 resource kit).


Report Offensive Follow Up For Removal


Response Number 6
Name: venkat27
Date: May 23, 2007 at 05:09:49 Pacific
Reply: (edit)

Hi,

I dont see the DSN in the control panel applet if i import the reg file. I can see the entries in the registry.


Report Offensive Follow Up For Removal






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Database Forum Home








Do you own an iPhone?

Yes
No, but soon
No


View Results

Poll Finishes In 6 Days.
Discuss in The Lounge
Poll History




Data Recovery Software