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

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Command line ODBC Driver Add?

Reply to Message Icon

Name: FrankTheTankWSU
Date: June 28, 2006 at 10:54:48 Pacific
OS: Windows XP
CPU/Ram: 3.0ghz/2gig
Product: 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



Sponsored Link
Ads by Google

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

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


0

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

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


0

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

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


0

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

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


0

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

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


0

Related Posts

See More



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

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.


0

Sponsored Link
Ads by Google
Reply to Message Icon






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


Sponsored links

Ads by Google


Results for: Command line ODBC Driver Add?

ODBC driver error on AS400 from VB www.computing.net/answers/dbase/odbc-driver-error-on-as400-from-vb/406.html

Problems with ODBC (SQL) www.computing.net/answers/dbase/problems-with-odbc-sql/302.html

ODBC Interface for Perl or Python? www.computing.net/answers/dbase/odbc-interface-for-perl-or-python/211.html