Thursday 7 April 2022

ODBC Deployment via GPO

 Deploying ODBC by GPO can be handy when you have a number of systems you need to keep updated.  The first thing is am going to make a few assumptions on this like

  1. You already have the driver installed into the system via another method and this is just setting up the connector its self.
  2. You know your away around Group Policy Management and import reg keys
You can do this the standard way via the following GPO location

User Configuration > Preferences > Control Panel Settings > Data Sources

But this can have some limitations in what can be done and you can also do it via importing the REG keys from within the GPO.  For this you will need to do the following:

  1. Set up the ODBC settings manual within ODBC, make a note if its a System Data or User Data as this changes the key location.
  2. Once this is done open reg edit and drill down in to the location of the connector you just made.

    User Data Sources
    Located here "HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI"

    System Data Sources
    Located here "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI"
  3. Once you located the key right click on it and select export and save it to a file.
  4. You know just need to open the GPO editor and set up the group policy and use the registry import wizard.

    But depending on  if its a system / user data source will change the location of if you do it under Computer or User

    Preferences > Windows Settings > Registry
  5.  you can then import the reg keys from the above locations, but if you are doing it on a different system then take the reg file you made and import it locally and then in to the GPO.  remember to delete them locally afterwards form the registry
Side note
It also need to export the key from the following location

Software\ODBC\ODBC.INI\ODBC Data Sources

It will make an entry with the same name and a value with which driver you used,  this is needed otherwise it will not show in the ODBC panel

No comments:

Post a Comment