I'm writing an install that will be posted as an add-on to one of our
programs on the internet. All these files need to be added in (which I do
have working), but if they hadn't previously installed some files from our
CD in a previous install, I ask them if they want to install them now. I
figured out how to do all the prompting, etc but now that I know their CD is
in the drive, how do I tell the installer what files from the CD to install
as well. I have their drive letter from an entry stored in their registry,
so once I have a complete path as to where the files should come from an go
to, I'm just confused as how to put them into the project with this drive
path.
Thanks for all the help you can give me!
You'll probably be interested in the XCopy command:
VarSave(SRCTARGETDIR) ; // saves the TARGETDIR and SRCDIR variables
TARGETDIR = "C:\\your destination path" ; // set where you want the files to
go
SRCDIR = "D:\\your source folder on the CD"; // set the source to copy from
XCopyFile ( szSrcFile , szTargetFile , COMP_NORMAL );
// szSrcFile would of course, be the sourcefile name (wildcards are
permitted)
// szTargetFile is ignored. Pass "" here
// See help documentation for COMP_NORMAL, and other copy flags
VarRestore(SRCTARGETDIR) ; // restore values in SRCDIR and TARGETDIR
--------------------------
See IS help files for further information on XCopyFile. One problem with
using this method is that there is no disk space check before using it - if
you wish to support disk space checking before XCopyFile, you must implement
it yourself.
Jerry Dennany
jer...@mindspring.com
Mike Krajewski <mkr...@evermore88.com> wrote in message
news:397a3...@208.30.171.38...