No announcement yet.

Sharing violation when extracting files

  • Filter
  • Time
  • Show
Clear All
new posts

  • Sharing violation when extracting files

    Hi all,

    I sometimes get a sharing violation when Setup Factory 8 extracts files to the
    %AppFolder%. It happens when it overwrites them. On a new installation it doesn't happen. It is not always the same file that gives it. My files are EXEs and are not running. All the files are set to "Always overwrite existing file".

    Any clues?

  • #2
    Probably a file is in use. After seeing such a message, check the processes list in the task manager.
    For exe's it's a good idea to terminate them before attempting to overwrite. Somewhere here there's a function how to kill a process by name. Or you may get sysinternals' pskill.exe , include it as a primer file in your project, and in the On Startup script send to it commands to terminate all the exe's you want to overwrite.

    You may also use the File.IsInUse() action to check if a file is in use.


    • #3
      Thank you for your reply.

      As I mentioned in my initial post, my EXE's are not running (in use).
      Also, if I extract them to a temporary location and then copy them to the %AppFolder% using actions, it works fine. I never get any violations.



      • #4
        It could be the antivirus. Try to turn off the on-access file scan and see if it helps.