i need to check the sql server version every time my application installation begins through inno setup. but as sql creates the server version specific entry(like MySQL Server 5.1) as key in the registry, so i have to give the path like
HKLM\SOFTWARE\Wow6432Node\MySQL AB\MySQL Server 5.1
while checking the version.
but when i install the sql server having version other than 5.1, it checks on the above path, it couldn't find. so again installation begins although it is already installed. so i want some generic path like
HKLM\SOFTWARE\Wow6432Node\MySQL AB\MySQL Server
which is not version specific. so that i can easily retreive the value from the MySQL key and check for it.My Code is
function fCheckMySQLInstall():boolean;
var
mysqlVersion : string;
begin
bIsMyQLInstalled := False;
if RegQueryStringValue(HKLM, 'SOFTWARE\Wow6432Node\MySQL AB\MySQL Server 5.1', 'Version', mysqlVersion) = true then
if CompareStr(mysqlVersion,'5.1') >= 0 then
bIsMyQLInstalled := True;
Result := bIsMyQLInstalled;
end;
as the path is /MySQL Server 5.1 which is not correct. should be generic for all version so that i can check for other version. Solutions are welcome.