kaldor37
20th July 2010 11:14 UTC
Ask to shut down a program before installing
Hi everyone,
At work we got an app with a NSIS setup and we have a problem during the updates.
If a client does an update while the program is running, the main exe can't be replaced, NSIS generates an error but continues installing and does the Post actions (writes the new version number into the registry).
Then the client runs the app with the new version number but with the old exec.
So I wandered if it is possible to check if the exe is running before installing the software and if it is, ask the client to shut it down (like we can see on java installations).
Many Thanks :)
pengyou
20th July 2010 12:18 UTC
There are several ways to do what you want. An easy way to do this is by using the LockedList plugin:
http://nsis.sourceforge.net/LockedList_plug-in
kaldor37
20th July 2010 13:00 UTC
Thanks, I'll try that and keep you in touch :)
kaldor37
20th July 2010 14:02 UTC
This is an almost perfect plugin except that it is not multilingual but it contains some nice features I can use.
pengyou
20th July 2010 15:37 UTC
The LockedList plugin's ReadMe file explains how to change a lot of the text which gets displayed.
If you use LangString commands to define the text strings then it is easy to make the LockedList plugin display appropriate text strings.
The attached screenshot is from a modified version of one of the example scripts that comes with the plugin. I don't speak French so I used Google to translate the strings so they may not make much sense!
kaldor37
20th July 2010 16:16 UTC
Thanks, I'll read the readme this sounds perfect :up: