- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: using XCopyFiles with open processes
- 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
using XCopyFiles with open processes
Hi,
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.
Best regards
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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
https://docs.revenera.com/installshield26helplib/LangRef/ServiceStopService.htm
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
It is a InstallScript MSI proyect.
Thanks for your help, Kudos. I`m going to see the links.
BR
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Thanks varul,
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?
BR
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
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)
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Ok,
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
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
You need to find the specific file which is holding the process, until the files process is stopped we wont be able to copy the files.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
The problem is the XCopyFile. It´s a atomic function and don´t give me any information about the error.
Any ideas?
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)