Quote:
Originally Posted by seventhorama
need help to get this install dir thing works
|
[Files]
Source: D:\TS2_ISOS\The Sims 2 Exp1 University\Patchfiles\*; DestDir: {code:GetAppPath}; Flags: ignoreversion recursesubdirs
Code:
var installDir : string;
function InitializeSetup(): Boolean;
Begin
// Checking running application
if FindWindowByWindowName('The Sims 2 University') <> 0 then
begin
MsgBox('The Sims 2 University is running.'#10'Please close the application first.', mbInformation, MB_OK);
exit;
end;
if not RegQueryStringValue(HKEY_LOCAL_MACHINE, 'Software\EA GAMES\The Sims 2 University', 'Install Dir', installDir)
then MsgBox('The Sims 2 University is not installed on this computer..'#10'Cancelling Update.', mbInformation, MB_OK)
else Result := True
End;
function GetAppPath(Param: string): string;
begin
Result := installDir;
end;