开发者

How to check if service is running before installation?

I'd like to check if some service is running开发者_如何学JAVA on the local computer before installation of my product. How can I check it?


This can be done through a custom action. With custom code you can find any information you want about a service. That information can then be saved in installer properties which can be used during install.

Since you need access to installer properties, you will have to use a win32 DLL or VBScript custom action. You can find a C++ DLL custom action tutorial here: http://www.codeproject.com/KB/install/msicustomaction.aspx


Since you're using WiX, you can use CloseApplication in WixUtilExtension to do this. Set @RebootPrompt="no" since you want it to be running and not shut down. Set @Property to a property you then use in a condition to show your warning.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜