views:

12

answers:

1

I need to uninstall an ODBC data source on ~30 computers and was hoping there'd be a quicker way than using the ODBC Administration GUI. This is a one time deal so I'm hoping to use a VBS or a Batch file. I've tried using reg delete but the data source still hows up in the ODBC Administration GUI.

Anyone know how to uninstall an ODBC data source with a VBS or a Batch file?

+1  A: 

You can do it, but it's not very neat because you'll have to edit the registry directly. To be more specific, your DSNs (or at least the System ones which are the only ones I've used) are stored in HKLM\SOFTWARE\ODBC\ODBC.INI, both as a subdirectory and as a single key under the ODBC Data Sources sub directory.

This Technet article should give you all the technical details: Can I Create and Delete a DSN Using a Script?

In general, if you need to do something via scripting, the Scripting Guy Blog is a good place to look for information.

ho1
Thank you, I don't know how I missed that article. Apparently I was missing the `ODBC Data Sources` key.
Stevoni