Creating MSI: terminating the application before upgrading

I am using Microsoft Visual Studio 2010 to create a simple .MSI installer for my simple .EXE application.

The problem is that everything goes wrong (before rebooting) if you install the update while .EXE is still working.

I want the .MSI installer to complete my process before installing / upgrading.

Please, can someone tell me how to do this in Orc?

EDIT: I saw that this was due to using my .EXE, but I also saw it because the .CHM help file was also open during the update, so just finishing the process is not enough to solve this problem.

+4
source share
3 answers

You should send MsiRMFilesInUse Dialog to your installer.

+3
source

You can try creating a custom action that stops your application (a custom EXE or DLL written by you). For example, you can send WM_CLOSE to the main application window (your application should process this message).

This custom action must be scheduled before the InstallValidate action in the InstallExecuteSequence table.

+1
source

You can write a custom action that closes your application, as well as a help file.

You can find window handles for both of them with FindWindow: http://msdn.microsoft.com/en-us/library/ms633499(v=vs.85).aspx

For the executable, you should be able to use the appropriate window class or title for FindWindow. For the help file, you should be able to use the appropriate help window for FindWindow.

Hope this helps!

0
source

Source: https://habr.com/ru/post/1341524/


All Articles