Inno Setup - Mehrfache Registry Abfrage

pcblizzard

Captain
Registriert
Nov. 2006
Beiträge
3.681
Hey ihr da draußen,

ich erstelle mit Inno Setup Installationsroutinen welche Dateien ersetzt/austauscht und frage dazu via Code-Eintrag den Installationspfad von dem Program ab.

Code:
(CODE)
procedure ShowSplashScreen(p1:HWND;p2:string;p3,p4,p5,p6,p7:integer;p8:boolean;p9:Cardinal;p10:integer); external 'ShowSplashScreen@files:isgsg.dll stdcall delayload';

procedure InitializeWizard();
begin
  ExtractTemporaryFile('Splash.png');
  ShowSplashScreen(WizardForm.Handle,ExpandConstant('{tmp}\Splash.png'),1000,1500,1000,0,255,True,$FFFFFF,10);
end;

function GetRegistryPath(DefaultPath: string): string;
begin
    if not RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\GOG.com\Games\1438074791', 'PATH', Result) then Result := ExpandConstant(DefaultPath);
end;
Code:
[Setup]
DefaultDirName={code:GetRegistryPath|{pf}\Ubisoft\Related Designs\Anno 1503 AD}

Nun kann es aber mal sein, dass Person A z.B. die gog.com Version von Anno 1503 hat aber Person B die Retail-Version (welche dann andere Einträge besitzt als die gog.com-Variante). Ist es nun möglich per Inno Setup nach beiden Einträgen zu suchen und falls Eintrag A nicht besteht auf Eintrag B und umgekehrt zurückzugreifen?


Vielen Dank schon einmal im voraus.
 
Zuletzt bearbeitet:
Zurück
Oben