Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
gknopf
- Newbie
- Posts: 12
- Joined: Thu Feb 10, 2011 11:11 pm
- Location: Germany
Post
by gknopf » Tue Nov 20, 2012 9:59 pm
Hi all,
I need to check if a MySQL connector is installed on the PC running my script. Does anyone know how to do it? Is there also a possibility to get a list of available ODBC connections to select the right connection string during run time?
Thanks in advance! (I would be lost without this forum and community!)

-
gknopf
- Newbie
- Posts: 12
- Joined: Thu Feb 10, 2011 11:11 pm
- Location: Germany
Post
by gknopf » Sat Nov 24, 2012 11:49 pm
I found the solution after playing around some time

. Actually its quite easy and I want to share it:
Code: Select all
//Read all installed ODBC drivers into variable RegKeys
RegistryEnumKeys>HKEY_LOCAL_MACHINE,Software\ODBC\ODBCINST.INI,RegKeys
//From that get all MySQL connectors into an array ('MySQLConnectors')
RegEx>(?=MySQL).*?(?=%CRLF%),RegKeys,0,MySQLConnectors,ConnectorCount,0
Hope you can use it.