Archive: Nsis cpack


Nsis cpack
I am using CPACK - NSIS to generate my installer.
When am trying to re-install my app on an existing installation it installs. But, when the app is running am not able to install it (the windows OS gives me some error). To avoid this I want to add a message box which says "The APP is already running, please close it before you install".
To do that I need to check if the process is running, something like FindProcDLL.
So is there a way to run the NSIS command in the cpack before the actual installation.

When I use CPACK_NSIS_EXTRA_INSTALL_COMMANDS the windows OS errors come up, but the message box comes up only after the installation.

Please advice
Thanks!


I don't know what CPACK is, but chances are you'll have to write your own script.


Cpack
Thanks for the reply.
CPack is a packaging system, it allows us to generate NSIS files.

I have a NSIS script but I dont know where to use it in cpack.
When I generate the installer using the project.nsi script it works fine.

With CPACK_NSIS_EXTRA_INSTALL_COMMANDS the warning dialog appears but at the end of the installation. I want it to check if the app is running already and abort the installation at the beginning.


My point was: You may have to write your own installer script. Instead of using some automated script generator such as Cpack or the zip2exe wizard. For details on the use of Cpack, you'll have to ask the creators of Cpack.


Okay. Thanks!
But, there should be a way to do it, since it does run post installation.