PDA

View Full Version : How to copy 4 folders contained on the installation CD ?


Sweden30
12-16-2007, 02:03 AM
Dear all,
I have the following question/problem:

I have created an installation using SF7, it works really fine.

Now Iīm going to distribute this installation "setup.exe" on a CD to all my employees, BUT, each CD is personalized with 4 folders containing different files on each CD folder.

This is my scenario:

"SETUP.EXE" installs my program on "C:\AAA" (on all my employees computers)
but now the 4 folders of each cd has to be copied also in "C:\AAA".

I donīt know if my explanation is clear, but itīs a bit hard to explain, in short:

How to make a setup program that after the installation is done itīs able to copy 4 folders from the inst. CD to the application folder?


Iīll be very gratefull if you can help me !.

Best Regards

Sweden30

NOTE: I need to do this because the files contained on each of those 4 folders are different for every single employee.

pww
12-17-2007, 05:16 AM
File.Copy action can copy multiple files at once


--create a folder on the target system to put the files into
trgDir = SessionVar.Expand("%AppFolder%") .. "\\dir1";
Folder.Create (trgDir);

--files to copy, assumes they are in a folder named dir1 under the CD root
srcFiles = SessionVar.Expand("%SourceDrive%") .. "\\dir1\\*.*";

File.Copy(srcFiles, trgDir, true, true, false, true, nil);



repeat the above 4 times to copy everything

Sweden30
12-17-2007, 09:25 AM
Thank you very much PWW,
I will try it rightnow.

Best regards

Sweden30

File.Copy action can copy multiple files at once


--create a folder on the target system to put the files into
trgDir = SessionVar.Expand("%AppFolder%") .. "\\dir1";
Folder.Create (trgDir);

--files to copy, assumes they are in a folder named dir1 under the CD root
srcFiles = SessionVar.Expand("%SourceDrive%") .. "\\dir1\\*.*";

File.Copy(srcFiles, trgDir, true, true, false, true, nil);



repeat the above 4 times to copy everything