marvc Posted May 31, 2005 Posted May 31, 2005 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.
m4dh0 Posted June 1, 2005 Posted June 1, 2005 the ms sql server odbc drivers is included with windows, however installshield can create odbc sources during installing an app
marvc Posted June 1, 2005 Author Posted June 1, 2005 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.
m4dh0 Posted June 1, 2005 Posted June 1, 2005 (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 June 1, 2005 by m4dh0
marvc Posted June 1, 2005 Author Posted June 1, 2005 I may need a little more assistance as I was under the impression that the following keys needed modifying:HKLM\Software\ODBC\ODBC.INIHKLM\Software\ODBC\ODBC.INI\ODBC Data SourcesHKLM\Software\ODBC\ODBCINST.INI\ODBC DriversHKLM\Software\ODBC\ODBCINST.INI\ODBC Driver NameHere's the DSN I need to create: Name: TCLDescription: TCLServer: MyTCLServerWindows NT authenticationUse ANSI quoted identifiers: No or UncheckedUse ANSI nulls, paddings, and warnings: No or uncheckedHow do I create this as a System DSN so that it applies to all user systems regardless of who's logged in??Thanks
m4dh0 Posted June 1, 2005 Posted June 1, 2005 the following registry file "should" do itWindows 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 usersYou 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
marvc Posted June 1, 2005 Author Posted June 1, 2005 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: TCLDriver Name: SQL ServerAnsiNPW=NoDatabase=MyTCLDatabaseDescription=TCLDriver=sqlsrv32.dllLanguage=defaultOemToAnsi=NoQuotedId=NoServer=MyTCLServerTrustedConnection=YesUseProcForPrepate=YesSystem DSN checkedI then repackage, compile, and run the executable but the DSN doesn't appear under ODBC. Am I missing something?
m4dh0 Posted June 2, 2005 Posted June 2, 2005 AS i dont have access to SMS + SMSI i cant really answer that
Noise Posted June 2, 2005 Posted June 2, 2005 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.
marvc Posted June 3, 2005 Author Posted June 3, 2005 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
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now