PDA

View Full Version : Problem with CopyFile() after upgrade from 7.02 to 7.04



Carsten Segieth
07-24-2002, 11:38 AM
This has been sent also to the IS support, but perhaps someone out there has an idea ...

After upgrading a project from 7.02 to 7.04 the CopyFile() function no longer works correct:
We try to copy a readme.txt which is located in the SRCDIR beside the SETUP.EXE (yes, I've checked it, it's really there!). Since the upgrade this only works if the setup kit is located on the same machine as the INSTALLDIR is. If it is started over the network (all tested: mapped network drive X:, \\public\share and \\hidden\share$ ) the file is not copied and the result code is the well known -2147024894. And there are no double qoutes around the pathes (see KB article Q105860 (http://support.installshield.com/kb/view.asp?pcode=WIND700E&articleid=Q105860)).

richardb
07-24-2002, 01:20 PM
I have noticed (in Developer 7.04) that if I try to use CopyFile, XCopyFile, FindFile, etc. in the OnMoved() event, they fail every time. If this is your situation, I suggest you try moving the call to CopyFile into the OnFirstUIAfter() event, where I have had more success in getting these functions to work.

Carsten Segieth
07-25-2002, 05:35 AM
Thanks a lot for the hint, that it fails in one and works in another event!

I've copied the call of CopyFile() to different events and realized, that it fails when called from OnInstallFilesActionAfter() or OnMoved(), but it works when called from OnFirstUIAfter() or OnEnd().

I think that I now have to change all my projects ... :mad: