Jump to content

Recommended Posts

Posted

I wasn't sure if I should post here or the Device drivers forum so I apologize in advance if any rules are being broken.

I'm wondering if anyone can confirm if it's possible to package and deploy the ODBC data source drivers as an exe or msi file? I have an app that calls for the SQL server data source driver to be installed on all XP client systems. I've tried repackaging the drivers in the application using the SMS installer but haven't had any luck so I'm wondering if it's possible to do this seperately.

Any responses are appreciated.


Posted

the ms sql server odbc drivers is included with windows, however installshield can create odbc sources during installing an app

Posted

Correct. I guess what I need is to be able to add a DSN connection to a SQL database using the SQL driver. My problem is figuring out how to package this as it seems to involve adding registry keys. THe other problem is making sure that this DSN remains available for all users.

Any responses are appreciated.

Posted (edited)

You can create sql server dsns via registry files, example below.

[HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\DSNNAME]
"Driver"="C:\\WINDOWS\\system32\\sqlsrv32.dll"
"Description"="Description"
"Server"="sqlservername"
"Database"="databasename"
"LastUser"="sqlusername"

[HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI\ODBC Data Sources]
"DSNNAME"="SQL Server"

oops edited to be HKEY_LOCAL_MACHINE to make into system dsns

Edited by m4dh0
Posted

I may need a little more assistance as I was under the impression that the following keys needed modifying:

HKLM\Software\ODBC\ODBC.INI

HKLM\Software\ODBC\ODBC.INI\ODBC Data Sources

HKLM\Software\ODBC\ODBCINST.INI\ODBC Drivers

HKLM\Software\ODBC\ODBCINST.INI\ODBC Driver Name

Here's the DSN I need to create:

Name: TCL

Description: TCL

Server: MyTCLServer

Windows NT authentication

Use ANSI quoted identifiers: No or Unchecked

Use ANSI nulls, paddings, and warnings: No or unchecked

How do I create this as a System DSN so that it applies to all user systems regardless of who's logged in??

Thanks

Posted

the following registry file "should" do it

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\TCL]
"Driver"="C:\\WINDOWS\\System32\\sqlsrv32.dll"
"Description"="TCL"
"Server"="MyTCLServer"
"QuotedId"="No"
"AnsiNPW"="No"
"Trusted_Connection"="Yes"

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources]
"TCL"="SQL Server"

as the above is all under HKLM it automaticaly becomes a system dsn available to all users

You also dont need to add anything under HKLM\Software\ODBC\ODBCINST.INI as the needed entries are already in place.

Ps. ive not tested this :whistle:

Posted

Thanks for the response. I think I see what you're saying:

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\TCL]

"Driver"="C:\\WINDOWS\\System32\\sqlsrv32.dll"

"Description"="TCL"

"Server"="MyTCLServer"

"QuotedId"="No"

"AnsiNPW"="No"

"Trusted_Connection"="Yes"

[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources]

"TCL"="SQL Server"

My next question is how to apply this? I added this in SMSI under Runtime Support\SQL Server ODBC 32 Driver as:

Data Source Name: TCL

Driver Name: SQL Server

AnsiNPW=No

Database=MyTCLDatabase

Description=TCL

Driver=sqlsrv32.dll

Language=default

OemToAnsi=No

QuotedId=No

Server=MyTCLServer

TrustedConnection=Yes

UseProcForPrepate=Yes

System DSN checked

I then repackage, compile, and run the executable but the DSN doesn't appear under ODBC. Am I missing something?

Posted

I used Wise InstallMaster to do this a few months ago. It was a pain in the a** to get it working right, took me about 2 solid days of work. I was capturing an Oracle client installation at the same time.

The Wise product is what Microsoft SMS Installer is based on. It's works better than SMS Installed on capturing installations on XP.

Posted

I do have Wise ver5 but haven't taken the time to learn it. If someone has a tutorial on creating packages I'd be glad to take a look at it.

thanks

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...