I’m making installation script and I’m using ODBC, how can I automatically add a node to ODBC Data Sources.
Building installer with Visual Studio setup project, but I’m able to run any script for it.
Thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1)
ODBC Data Sources are typically defined in registry entries – located at –
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI…… (DSNs on 32bit Windows or 64bit Windows)
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI…… (DSNs on 64bit Windows for 32bit Drivers)
That part of the registry contains the “System” DSNs – HKEY_CURRENT_USER contains “User” DSNs.
Of course, all drivers are different so there may be additional stuff required elsewhere too…
2)
You could also consider using File DSNs and ship the fie with the installer.
3)
You could also consider a DSN’less connection – but this would depend on how the ODBC application is coded.