Copying a file using inno setup after the installa

2019-01-28 09:16发布

问题:

I am installing the Apache through the Inno setup. Now I want to copy the httpd.conf file from my localdisk to Apache conf folder after the Apache installation. How can I achieve this using inno setup?

回答1:

you can use my code to copy your httpd.conf file to Apache conf folder,try it:)

procedure CurStepChanged(CurStep: TSetupStep);
if CurStep = ssDone then
begin
//copy your httpd.conf file from your localdisk to Apache conf folder
FileCopy('/you/path/httpd.conf','/apache/conf/httpd.conf',False);
end;


回答2:

I solved this issue by using the

AfterInstallation

command in [Run] section. It works fine.