Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Why my copy function failed?


2 replies to this topic

gloom

gloom
  • Full Members
  • 50 posts

Posted 18 May 2004 - 05:45

--------------------------------------------------
#define GRAPH_FILE "file.bmp"
...

function MyCopyFile(hInstall)
STRING szPath, szTMPDir;
NUMBER nvSize;

begin
nvSize = 1024;
MsiGetProperty(hInstall, "PathGraphFolder", szPath, nvSize);
nvSize = 1024;
MsiGetTargetPath(hInstall, "TempFolder", szTMPDir, nvSize);
if (XCopyFile(szTMPDir ^ GRAPH_FILE, szPath ^ GRAPH_FILE, COMP_NORMAL) < 0) then
MessageBox("Copy function failed", WARNING);
else
MessageBox("File successfully copied", INFORMATION);
endif;

--------------------------------------------------

If I copy from another folder (different from Temp folder) copy is OK.
I don't understand.
Why I can't copy from Temp?

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 18 May 2004 - 08:39

Maybe you need to add " to each end of the path in case the path contains spaces?
Regards
-Stein Åsmul

gloom

gloom
  • Full Members
  • 50 posts

Posted 18 May 2004 - 13:18

I found that XCopyFile() is working strange. I use CopyFile().

In any case
thanx, Glytzhkof for your reply! smile.gif