Archive: Search for an installed MySQL Server?


Search for an installed MySQL Server?
How can I search for an installed Version of a MySQL server on the end-user's PC? I need to get the installation directory of the MySQL Server.

I also need to know, can the NSIS configure the INSTDIR to be accessible to http://localhost/?

e.g the Install Directory of the Program is C:\MyApp, the user can view the files using http://localhost/MyApp

Please help me... Thanks


Just a thought, but could you check the registry for a location? I know MSDE puts several registry entries in place, such as HKLM\Software\Microsoft\Microsoft SQL Server\80\Tools\ClientSetup\SQLPath.

You could use ReadRegStr to read that registry entry, which should be in the same place in the registry no matter where you install the application. Again, just a guess, good luck.


MySQL reg keys
Well, I don't know if this is valid for other versions of MySQL on windows, but I have MySQL 4.x installed and these are the keys:

Key Name: HKEY_CLASSES_ROOT\.mysql
Class Name: <NO CLASS>
Last Write Time: 8/14/2005 - 3:07 PM
Value 0
Name: <NO NAME>
Type: REG_SZ
Data: mysql_auto_file




Key Name: HKEY_CLASSES_ROOT\mysql_auto_file
Class Name: <NO CLASS>
Last Write Time: 8/14/2005 - 3:07 PM
Value 0
Name: <NO NAME>
Type: REG_SZ
Data:


Key Name: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu\Programs\MySQL\MySQL Server 4.1
Class Name: <NO CLASS>
Last Write Time: 9/21/2005 - 7:03 PM
Value 0
Name: Order
Type: REG_BINARY
Data:

<snip>


There are other keys, but maybe the start menu entry is good enough?