scripting constant is the way to go. You just need to make sure that you prompt the user only once and reuse the results for both the source and destination path.
For example, you can use CreateInputDirPage and implement a constant script to reference the path that the user pointed to on the page:
[Run] Filename: "robocopy.exe"; Parameters: "{code:CopyDir} {code:CopyDir}\OLD"
[Code] var CopyDirPage: TInputDirWizardPage; procedure InitializeWizard(); begin CopyDirPage := CreateInputDirPage(wpSelectDir, 'Select source directory', '', '', False, ''); CopyDirPage.Add('Source directory:'); end; function CopyDir(Params: string): string; begin Result := CopyDirPage.Values[0]; end;
source share