Hi all, I am new to scripting with Inno Setup. I've written a program that provides diagnostic services for another program. Chances are high that users who install this program already have the other program on their computers so I want the installer to check if the other program exists (I know how to do this using RegKeyExists), and if it does I want it to extract the location of that program which is stored in one of the values.
My question is, can this be done? Does Inno Setup Script have a function for retrieving RegKeyValues?
I guess it should look something like this:
Code:
#define MyAppDir := BaseDir()
#define MyAppName 'test'
[Setup]
DefaultDirName={#MyAppDir}{#MyAppName}
[Code:]
function BaseDir(): String
var ParentProgInstalled : Boolean
begin
ParentProgInstalled := RegKeyExists(HKLM, 'thesubkeyname');
if ParentProgInstalled =true then begin
Result := 'Insert appropriate function to retrieve regkeyvalue';
end;
else begin
Result := 'C:\myprog\myprogfolder'
end;
end;
Oh and there isn't actually a colon in my code tag, i just want it to parse correctly..