‎Jan 24, 2007 01:47 PM
function GetCurrentVersion(hMSI)
STRING szKey,szValue,szName, szClass, svCurrentVersion;
NUMBER nRootKey,nType,nResult,nvSize;
begin
nvSize = -1;
szKey = "SOFTWARE\\STARS_SW";
szValue = "";
szName = "";
nType = REGDB_NUMBER;
nRootKey = HKEY_LOCAL_MACHINE;
svCurrentVersion = "0";
MessageBox ("Looking for REG Key", INFORMATION);
nResult = RegDBSetDefaultRoot (nRootKey);
if (nResult = 0) then
if (RegDBKeyExist (szKey) < 0) then
MessageBox ("First call to RegDBKeyExist failed.", SEVERE);
else
SprintfBox (INFORMATION, "VERSION", "%s exists.", szKey);
nResult = RegDBGetKeyValueEx (szKey, szName, nType, szValue, nvSize);
if(nResult = 0) then
MsiSetProperty( hMSI,"IS_STARS_UPDATE", szValue);
endif;
endif;
endif;
return(nResult);
end;
‎Jan 24, 2007 02:54 PM
‎Jan 24, 2007 03:04 PM
‎Jan 25, 2007 06:17 AM