PDA

View Full Version : copying file from cd


kerri
01-26-2004, 04:20 PM
Hi - I am trialing Setup Factory and am stuck on how to have a file copied from a cd where the setup.exe will be run from.
More specifically, the exe will be autorun from a cd and on the cd there is an additional file which needs to be copied to the Windows directory before the install begins.
I tried entering a copy command in the Before Install action section using no path - just the file name - thinking that setup would copy the file from its current location but it didnt work.
And adding the file to the source files is not an option.
Any help would be most appreciated - this seems like a great program.

regards.

kerri

Darryl
01-28-2004, 09:37 AM
Hi Kerri,

Your best bet is to use an "Install File" action that can be found in the "Files" category of the actions list. However the Copy Files action would work too if you wanted to use that.

When referencing that file, you will need to use one of the built-in variables that will expand to the correct drive letter of the CD-ROM. If both the install executable and the file you want installed are in the root of the CD, you can use the variable %SrcDrv%. For example:

%SrcDrv%\myfile.txt

There is also one available for the directory where the install is run, that being %SrcDir%. You could use either of these in this situation.

Hope that helps.

kerri
01-28-2004, 10:32 AM
Hi, yes both the setup.exe and the file are in the same place - root of the cd. I will try your suggestion when i get home and let you know but do I need to do this in the CD-ROM tab? which I am not too clear about. thanks for your help!
kerri

Darryl
01-28-2004, 02:39 PM
Hi Kerri,

In this case, you do not need to add the file to the CD-ROM tab in Setup Factory. The CD-ROM tab is used to install files that exist outside of the installation executable archive, however they are installed along with the other files.

Since in your case, you need that file to be installed before any other files are installed, you are better off using the Install File action so you can perform the file install at any point before the other files are actually installed.

Hope that helps.

kerri
01-28-2004, 07:01 PM
It worked! thanks! I used %SrcDrv%\myfile.exe
and used Install action as you mentioned.
However, being new at this, I don't see the difference between COPY and INSTALL. I tried both actions, and they both did the same - put the file in the destination folder I specified.
But whatever, problem solved and thanks again!
kerri

Darryl
01-30-2004, 10:10 AM
Basically the difference between the two actions is that the Install File action provides the overwrite options, the create backup ability and to specify the file as a shared file. The copy files action doesn't contain this type of control.

Hope that answers your question.