using XCopyFiles with open processes
I´m using XCopyFiles to copy all files from a directory include SubDirectories.
nRes = XCopyFile(sourceDir, TargetDir,COMP_NORMAL | INCLUDE_SUBDIR) ;
My problem is there is some files exe, that could be executing and when I try to copy them, I recieve an error Message and the process finalize.
I have seen some instalators that show a standard windows indicating " there is a process that not permitted to copy the file. Please, close it.
Has someone know to use that dialog.
is there any way to solve the problem.
I have thougth that a solution, making my own XCopyFile as a recursive process using fileCopy, but i don`t know if it´s the best solution.
Thanks for your help.
What is your project type?
Is any process or service is using the files being copied then kill or stop the service before copying the files, try killprocess customaction or stop service function
I have seen the links, but my problems is that I dont know what is the process.
I have a folder with 300 files, and I don´t know which exe file is started. So when I going to copy all files, the process is stopped because of one exe file is executing.
I would like to control this sequence and show a message for avoiding the error.
Is there any way to do this?
Could you please explain your use case, why you are moving this file from one folder to other?
when you are doing this at the time of upgrading (like from upgrading from version1 to version2 time)
I have a file in SRC_DIR called bin, when I execute the setup, I check one variable in the Registry.
After that, I use this value, for example, C:\Target to copy the files from SRC_DIR.
These files dont belong to any component.
The problem ocurrs when one file that I going to copy is in execution