How to add registry key in innosetup with value from function. I want to set the IsServer value in the registry as the return value of InstallAsServer
[Code] [Registry] Root: HKLM; Subkey: "Software\company\product\Settings"; ValueType: string; ValueName: "IsServer"; ValueData: {code:InstallAsServer} var Page: TInputOptionWizardPage; IsServer: Boolean; procedure InitializeWizard; begin Page := CreateInputOptionPage(wpWelcome, 'Install Type', 'Select Install Type', 'Please select Installation type; If Server click Server else Client', True, False); // Add items Page.Add('Install as Server'); Page.Add('Install as Client'); // Set initial values (optional) Page.Values[0] := True; Page.Values[1] := False; IsServer := Page.Values[0]; end; function InstallAsServer(emppararm: string): string; //emppararm not used just for syntax begin if (IsServer=False) then begin result:= '0'; end else begin result:= '1'; end end;
But I always get the value set as 1, even if I select the server or client on the page
source share