inno setup - find generic path of MySQL in registry as it creates version specific entry as key in registry -
i need check sql server version every time application installation begins through inno setup. sql creates server version specific entry(like mysql server 5.1) key in registry, have give path
hklm\software\wow6432node\mysql ab\mysql server 5.1
while checking version.
when install sql server having version other 5.1, checks on above path, couldn't find. again installation begins although installed. want generic path
hklm\software\wow6432node\mysql ab\mysql server
which not version specific. can retreive value mysql key , check 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 if comparestr(mysqlversion,'5.1') >= 0 bismyqlinstalled := true; result := bismyqlinstalled; end;
as path /mysql server 5.1 not correct. should generic version can check other version. solutions welcome.
so must enumerate keys under 'software\wow6432node\mysql ab\' using regenumkey(ex) , matching "mysql server vx.y" yourself, , determining highest version that.
the delphi/freepascal registry unit provide functionality enumerating keys way, in inno setup can use reggetsubkeynames function that.
Comments
Post a Comment