i am new to SF7 and not a good scripter: i am building an install for an add-on that is to work on two versions of the base program (Flight Simulator 2004 and FSX). my add-on needs to be installed into the base program directory tree, which is already installed.

i have made a radio screen for the user to choose, upon this selection i need to get the correct install path from the registry and let the installer use that one.

how to i do this?`i understadn it should be scripted into 'On Pre Install' and this is what i have unsuccessfully tried:

Code:
tRadioButton1 = DlgRadioButton.GetProperties(CTRL_RADIO_BUTTON_01);
tRadioButton2 = DlgRadioButton.GetProperties(CTRL_RADIO_BUTTON_02);
if tRadioButton1.Checked then
	AppFolder = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Microsoft Games\\Flight Simulator\\9.0", "Exe Path", true);

elseif tRadioButton2.Checked then
	AppFolder = Registry.GetValue(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Microsoft Games\\Flight Simulator\\10.0", "SetupPath", true);

SessionVar.Set("%AppFolder%", AppFolder);
end
but this must be totally wrong....
gratefull for any help...