Skip to content
⌘ NSIS Forum Archive

Uninstaller - Files in use

7 posts

Tonst#

Uninstaller - Files in use

If a file is locked (i.e. file open / exe running) the uninstaller will not DELETE it, but also does not complain with an abort/skip/retry.
When you come to install (say a newer version) it WILL complain that it cannot overwrite a file in use with an abort/skip/retry.

My installer triggers the uninstall of previous versions and waits for it to finish. I've seen a few threads about FindProcDLL but I don't really want to have to go searching for several processes and it's not going to work with any file locks not caused by a known process. How does everyone deal with this?

Thanks.
Tonst#
Thanks! It'd be good if I could *.dll *.ocx within my paths just to be 100%. For now i've got it to look for all my exe names and I think that'll do. At least it looks pretty 🙂
Tonst#
Yeah it does work with all types, the niggle I have is that I can't pass the plugin path with a wildcard filename. I don't want to write out 70 odd ocx/dll names, well especially not at this stage as our build output is still changing quite a bit. I suppose I could write a script in NSIS to find the matching files and pass those through though.
Afrow UK#
You either add an application to the list by knowing one of its module names or by knowing all or part of the window title or window class.

Stu