Source: "{code:GetBackupFolderPage}"; DestDir: "{app}\Common"; Flags: external skipifsourcedoesntexist recursesubdirs....[Code]
...
function GetBackupFolderPage(Param: string): string;
var Path: string;
begin
Path := Page.Values[0];
If Path = '' then Result := '' else Result := Path + '\*';
end;
It works like a charm in Inno 6, but Inno 7 creates installer that causes "PathRedir: Called with empty path string." error.
Hm, it makes sense.
Thank you very much for your help and suggestion!
I have an installer code that handles user's input for possible overwriting default files by the files from the backup folder. This folder user selects during installation - but there could be cases of "clean install" when user selects nothing.
Yes, I know it is not the best practice to allow user have an access to admin-only restricted folders - even through installer.
However, this is very specific application: it is installer of software that operates an instrument. Because it is necessary to store both serial number and calibration file those are specific to the exact instrument - it is necessary to develop such "backup" option.
Don't ask me why software developer didn't designed correct position of these files rather than in program dir - I am not that guy.