2012-09-17 22:26 UTC
Hi all,
First, my apologies for the translation (Spanish to English)
I've been doing a project installing a palette interface OpenDCL and I made a setup project in InnoSetup for distribution. The project set up the silent installation of OpenDCL Runtime:
In this part of the call to a function; Check: CheckOpenDCLRuntimeInstalled, to see if OpenDCL Runtime is installed and if so know which version is installed also to give a notice to the user. If the installed version is greater or equal, not installing OpenDCLRuntime run.
Function:
I wonder if I can find out if Windos Registry OpenDCL Runtime is installed and the installed version. I think it would be a more reliable way of obtaining this information.
You can see the project at:
{2}
greetings and thanks.
First, my apologies for the translation (Spanish to English)
I've been doing a project installing a palette interface OpenDCL and I made a setup project in InnoSetup for distribution. The project set up the silent installation of OpenDCL Runtime:
#define OpenDCLRuntime "OpenDCL.Runtime"
#define OpenDCLRuntimeVer "6.0.2.5"
#define OpenDCLRuntimeAndVersion OpenDCLRuntime + "." + OpenDCLRuntimeVer + ".msi"
....
Name: "opendcl"; Description: {cm:CompOpendcl};Types: full; Flags: dontinheritcheck
;;-------------------------- OpenDCL ------------------------------------------------
Source: "INSTALACION\{#OpenDCLRuntimeAndVersion}"; DestDir: {tmp}; Flags: deleteafterinstall; Components: opendcl;
Filename: msiexec.exe; Parameters: "/q /i ""{tmp}\{#OpenDCLRuntimeAndVersion}""" ; WorkingDir: {tmp};StatusMsg: Instalando {#OpenDCLRuntimeAndVersion}; Flags: waituntilterminated runminimized; Check: CheckOpenDCLRuntimeInstalled; Components: opendcl; AfterInstall: DCLRuntimeInstalledOK
In this part of the call to a function; Check: CheckOpenDCLRuntimeInstalled, to see if OpenDCL Runtime is installed and if so know which version is installed also to give a notice to the user. If the installed version is greater or equal, not installing OpenDCLRuntime run.
Function:
//----------------------- CheckOpenDCLRuntimeInstalled ----------------------------
// Chequea si puede instalarse OpenDCL Runtime en el equipo
function CheckOpenDCLRuntimeInstalled: Boolean;
var
sVerI, strVerInstalled, Path: string;
begin
Result := true;
if DirExists(ExpandConstant('{cf}\Opendcl')) then
begin
Path:= ExpandConstant('{cf}\Opendcl');
end else if DirExists(ExpandConstant('{cf32}\Opendcl')) then
begin
Path:= ExpandConstant('{cf32}\Opendcl');
end;
if Path <> '' then
begin
Path:= Path + '\OpenDCL.18.arx';
if FileExists(Path) then
begin
if GetVersionNumbersString(Path, strVerInstalled) then
begin
sVerI := ExpandConstant('{#OpenDCLRuntimeVer}');
if strVerInstalled >= sVerI then
MsgBox('Can not install OpenDCLRuntimeAndVersion} + # 13 +
'because there is already a version equal or higher {#OpenDCLRuntime}.' + strVerInstalled + #13 +
'installed on this computer.'
, mbInformation, mb_Ok)
Result := false;
end;
end
end;
end;
I wonder if I can find out if Windos Registry OpenDCL Runtime is installed and the installed version. I think it would be a more reliable way of obtaining this information.
You can see the project at:
{2}
greetings and thanks.