I want to close running instance of my application on repair option of my setup....
我想在我的设置的修复选项上关闭我的应用程序的运行实例....
1 个解决方案
#1
0
This can be done through a custom action. There is no predefined support for it, so you will need to write your own custom code. A good approach is sending WM_CLOSE to the main application window and let it close itself.
这可以通过自定义操作完成。没有预定义的支持,因此您需要编写自己的自定义代码。一个好方法是将WM_CLOSE发送到主应用程序窗口并让它自行关闭。
To run this custom action only during repair, you can try conditioning it with REINSTALL property.
要仅在修复期间运行此自定义操作,您可以尝试使用REINSTALL属性对其进行调整。
If you want to avoid the Files In Use dialog, you will need to run this custom action before InstallValidate action. In this case you cannot use REINSTALL property, but you can use this condition:
如果要避免使用“文件”对话框,则需要在InstallValidate操作之前运行此自定义操作。在这种情况下,您不能使用REINSTALL属性,但您可以使用以下条件:
Installed
It evaluates to true when your package is running in maintenance mode (modify, repair or remove).
当程序包在维护模式下运行(修改,修复或删除)时,它的计算结果为true。
#1
0
This can be done through a custom action. There is no predefined support for it, so you will need to write your own custom code. A good approach is sending WM_CLOSE to the main application window and let it close itself.
这可以通过自定义操作完成。没有预定义的支持,因此您需要编写自己的自定义代码。一个好方法是将WM_CLOSE发送到主应用程序窗口并让它自行关闭。
To run this custom action only during repair, you can try conditioning it with REINSTALL property.
要仅在修复期间运行此自定义操作,您可以尝试使用REINSTALL属性对其进行调整。
If you want to avoid the Files In Use dialog, you will need to run this custom action before InstallValidate action. In this case you cannot use REINSTALL property, but you can use this condition:
如果要避免使用“文件”对话框,则需要在InstallValidate操作之前运行此自定义操作。在这种情况下,您不能使用REINSTALL属性,但您可以使用以下条件:
Installed
It evaluates to true when your package is running in maintenance mode (modify, repair or remove).
当程序包在维护模式下运行(修改,修复或删除)时,它的计算结果为true。