This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- xCopyFile Failing
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 15, 2008
02:53 PM
xCopyFile Failing
xCopyFileFailing in 2008 professional - get negative error which means file not found.
Paths are correct and createdir works.
I have even tried full path C:\\smartware group\smart maintenance
Still does not work
snippet of code is below
function BackupFiles(hMSI)
number nReturn;
string sReturn;
begin
nReturn = CreateDir(WINDISK + "\\smartbackup");
if nReturn != 0 then
NumToStr(sReturn, nReturn);
MessageBox("Error " + sReturn, SEVERE);
endif;
nReturn = XCopyFile("PROGRAMFILES + Smartware Group\\Smart Maintenance", "C\\smartbackup", COMP_NORMAL | READONLY | INCLUDE_SUBDIR);
if nReturn != 0 then
NumToStr(sReturn, nReturn);
MessageBox("Error " + sReturn, SEVERE);
endif;
Paths are correct and createdir works.
I have even tried full path C:\\smartware group\smart maintenance
Still does not work
snippet of code is below
function BackupFiles(hMSI)
number nReturn;
string sReturn;
begin
nReturn = CreateDir(WINDISK + "\\smartbackup");
if nReturn != 0 then
NumToStr(sReturn, nReturn);
MessageBox("Error " + sReturn, SEVERE);
endif;
nReturn = XCopyFile("PROGRAMFILES + Smartware Group\\Smart Maintenance", "C\\smartbackup", COMP_NORMAL | READONLY | INCLUDE_SUBDIR);
if nReturn != 0 then
NumToStr(sReturn, nReturn);
MessageBox("Error " + sReturn, SEVERE);
endif;
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 16, 2008
10:52 AM
This is how I would code it. I have used this syntax, maybe give it a go?
nReturn = XCopyFile(PROGRAMFILES ^ "Smartware Group\\Smart Maintenance\\*", "C:\\smartbackup\\*", COMP_NORMAL | READONLY | INCLUDE_SUBDIR);
nReturn = XCopyFile(PROGRAMFILES ^ "Smartware Group\\Smart Maintenance\\*", "C:\\smartbackup\\*", COMP_NORMAL | READONLY | INCLUDE_SUBDIR);
![](/skins/images/CC38E504FC9E1309DC48ACFEB4925670/responsive_peak/images/icon_anonymous_message.png)