Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 2

Installshield unable to backup a folder  before installing new files

I am not able to have my install script to copy all the files from an installed folder (C:\ProgramData\CompanyName\ProductName\config) to a backup folder (C:\ProgramData\CompanyName\ProductName\config_20210930[10:12:01]) before installing the new files to it.  Instead it copied the newly installed files to the backup folder.


nResult = XCopyFile ( C:\ProgramData\CompanyName\ProductName\config\myfile.txt, C:\ProgramData\CompanyName\ProductName\config_20210930[10:12:01], COMP_NORMAL);

Labels (1)
0 Kudos
(1) Reply
Revenera Moderator Revenera Moderator
Revenera Moderator

What is your project type?

Are you doing upgrade like when version1 is installed before installing verison2 you are creating backup of version1 is my understanding correct?

If you are using the script as a customaction then you need to sequence it at app search of installexec sequence or any anything before uinstalling older version or updating older version.

If you are using install script function , try on firstuibefore

0 Kudos