I explain my project : my setup will be delivered with 2 licence files beside him who they must not be include inside the concerned setup. Like this :
Folder/
----Setup.exe
----CanBTL.dat
----CanBTP.dat
And i want, if that's sure they are here, to copy this files in a folder who will be build with Setup.exe. So i'm trying to make this code :
I edit my script : EDIT :
[Code]
function CheckForFile(CurPageID: Integer): Boolean;
begin
if (CurPageID = wpFinished) and (FileExists('CanBTL.dat' + 'CanBTP.dat')) then
begin
FileCopy(ExpandConstant('CanBTL.dat' + 'CanBTP.dat'), ExpandConstant('{cf}\Folder\'), false);
end;
end;
The goal is to copy the two .dat file next to the setup in a folder created by the setup.exe
It compile, but seems to make nothing. My files are not copied.
I'm still a beginner to the section code in Inno Setup so if anyone can help me?
Thanks
Ok. No need of code section, that's working fine using external
flags and the
{src}
constant to say current directory :
Source: "{src}\CanBTL.dat"; DestDir: "{cf}\Folder"; Flags: external;
Source: "{src}\CanBTP.dat"; DestDir: "{cf}\Folder"; Flags: external;
Thanks TLama
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With