1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#define MyAppId "{CA05C15E-0FDC-48C3-A5CB-92E77Z72F512}"
[Setup]
AppId={{#MyAppId}
[CustomMessages]
french.InstalledVersion=Version %s déjà installé.
[code]
function InitializeSetup(): Boolean;
var
InstalledVersion: String;
begin
Result := True;
if RegQueryStringValue( HKLM, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{#MyAppId}_is1', 'DisplayVersion', InstalledVersion) then
begin
MsgBox(Format(ExpandConstant('{cm:VersionAlreadySet}'), [InstalledVersion]), mbError, MB_OK);
Result := False;
end;
end; |
Partager