Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to create an ODBC connection in System DSN on a bunch of windows machines. What can I do to make this process simpler than manually typing the details into the Create New Datasource Wizard on each machine? Something like a *.reg file I can just double click on would be ideal.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

The information is stored in

HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources

Source: Petri - ODBC System DSN Creation (Check it, there is a script)

share|improve this answer
1  
For future comers: there are two parts to this. The key above contains a list of data sources. Each data source in the list also has it's own key (folder) in either HKLM\SOFWARE\ODBC\ODBCI.INI or HKCU\SOFTWARE\ODBC\ODBC.INI. So, in a nutshell, don't forget to check Current User as well as local machine (some things only work in one or the other) and don't forgot to copy both parts. –  Joel Coehoorn Apr 7 '11 at 15:12
    
Also, on 64-bit systems there are two separate odbc connection registrations, so you also need to look in `\\HKLM\Software\WoW6432Node\ODBC` if you want your entry to be available to 32bit programs. –  Joel Coehoorn Oct 10 '12 at 19:23
    
Finally, if you want you want to store a password with your entry, you'll have to look somewhere else. There's no way I've found to set a password here, even an encrypted one. –  Joel Coehoorn Oct 10 '12 at 19:24
    
Also, Tom, I'd like your permission/action to edit this additional info into the answer. –  Joel Coehoorn Oct 10 '12 at 19:25
    
@JoelCoehoorn: Go ahead, you have permission. –  Tom Wijsman Oct 10 '12 at 20:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.