I am an experienced programmer that is fairly new to C++. I have written a small installation executable that is supposed to copy a set of files from within a directory just on the CD. The problem is that I do not know which drive letter will be used for the CD (EG D:\, E:\ F:\). I have tried copying the file using windows.h and system("COPY .... "); both look for the files in my documents, not on the CD...
Example code:
CopyFile("bin\\install.php", copyfile.c_str(), true);
- OR -
cmd = "COPY /Y \"bin\\install.php\" \"" + htdocsloc + "\\install.php\"";
cout << cmd << endl;
system(cmd.c_str());
When compiled, then the exe put on the cd, it says that the system cannot find the file specified. Can anyone help me with this problem?