![]() |
#1 |
Junior Member
Join Date: Apr 2004
Posts: 34
|
Check for loaded DLL or running EXE?
Hi,
One of the installers I built installs/updates DLL's and EXE's, so I need to first check whether any of the files I might update is currently running. Does anyone have some NSIS code to check for this? Thank you Fred. |
![]() |
![]() |
![]() |
#2 |
Major Dude
|
FileOpen will do the trick, as it gives error if a file is running (is this right?).
|
![]() |
![]() |
![]() |
#3 |
NSIS Dev
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
|
See the attached zip file for the FindProc plugin.
Usage is described in FindProc.txt I haven't tried it with DLLs, but that might work as well. If not, modify the source code so that it does. |
![]() |
![]() |
![]() |
#4 |
NSIS Dev
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
|
Oops, the plugin.
|
![]() |
![]() |
![]() |
#5 |
NSIS Dev
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
|
Slightly modified version of the plugin. Fixed returned values to align with the original author's source code.
Functionally identical to the previous version, only the return values are different. |
![]() |
![]() |
![]() |
#6 |
Junior Member
Join Date: May 2004
Posts: 3
|
thanks , I will try it !
|
![]() |
![]() |
![]() |
#7 |
Junior Member
Join Date: Apr 2004
Posts: 34
|
Thx to both of you. I'll give this plug-in a try. In the mean time, this code seems to work too:
code: Fred. |
![]() |
![]() |
![]() |
#8 |
NSIS Dev
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
|
This would work only if you actually needed to overwrite the file.
In my case, there were modules I needed to install which could not be done if the main application was running. Using my plugin, I could detect if the main app was running and prompt the user to close it before proceeding. I did not want to overwrite the main app - just check if it was running. |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|