Inno Setup Carga los valores predeterminados para la configuración de instalación personalizada desde un archivo (.inf) para la instalación silenciosa

Tengo un script de configuración que permite al usuario especificar dónde le gustaría instalar mi aplicación. Tiene la forma de un guión Pascal dentro del[Code] bloquear.

var
  SelectUsersPage: TInputOptionWizardPage;
  IsUpgrade : Boolean;
  UpgradePage: TOutputMsgWizardPage;

procedure InitializeWizard();
var
  AlreadyInstalledPath: String;
begin
  { Determine if it is an upgrade... }
  { Read from registry to know if this is a fresh install or an upgrade }
  if RegQueryStringValue(HKLM, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{#MyAppId}_is1', 'Inno Setup: App Path', AlreadyInstalledPath) then
    begin
      { So, this is an upgrade set target directory as installed before }
      WizardForm.DirEdit.Text := AlreadyInstalledPath;
      { and skip SelectUsersPage }
      IsUpgrade := True;

      { Create a page to be viewed instead of Ready To Install }
      UpgradePage := CreateOutputMsgPage(wpReady,
        'Ready To Upgrade', 'Setup is now ready to upgrade {#MyAppName} on your computer.',
        'Click Upgrade to continue, or click Back if you want to review or change any settings.');
    end
  else
    begin
      IsUpgrade:= False;
    end;

  { Create a page to select between "Just Me" or "All Users" }
  SelectUsersPage := CreateInputOptionPage(wpLicense,
    'Select Users', 'For which users do you want to install the application?',
    'Select whether you want to install the library for yourself or for all users of this computer. Click next to continue.',
    True, False);

  { Add items }
  SelectUsersPage.Add('All users');
  SelectUsersPage.Add('Just me');

  { Set initial values (optional) }
  SelectUsersPage.Values[0] := False;
  SelectUsersPage.Values[1] := True;
end;

Entonces, la pregunta es ¿cómo podría soportar una instalación silenciosa? Cuando un usuario invoca/SILENT o/VERYSILENT el instalador por defecto esSelectUsersPage.Values[1], que es paraJust Me. Quiero ayudar a apoyar al usuario que quiere cambiar el directorio de instalación proporcionando un archivo de respuesta.

No desarrollé todo este código, y soy un novato con Pascal.

Gracias.

Respuestas a la pregunta(1)

Su respuesta a la pregunta