Problem stopping Windows Service from Installer Class. Events fire too late

…衆ロ難τιáo~ 提交于 2019-12-05 19:36:35

The try again message is shown by FilesInUse installer dialog. During InstallValidate action Windows Installer automatically detects files in use and prompts the user about them.

A solution is to stop (without removing) the service before InstallValidate action. This can be done through a custom action.

Please note that you cannot set a custom action before InstallValidate with Visual Studio. However, you can edit the MSI with Orca after it's generated and change the action sequence in InstallExecuteSequence table.

Most commercial setup authoring tools and WiX support custom sequences for your actions.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!