【发布时间】:2012-05-06 22:58:02
【问题描述】:
我正在使用 NSIS 为我的应用程序开发安装程序。我需要对此安装程序做的是检查端口 80 是否可用,如果可用,请继续安装程序,如果它没有给出错误消息,其中包含在端口 80 上运行的进程名称。
我找到了一种方法来检查端口 80 是否可用。为此,我使用 Ports.nsh 作为插件。 http://nsis.sourceforge.net/Check_open_ports
${If} ${TCPPortOpen} 80
MessageBox MB_OK|MB_ICONSTOP "PORT 80 is already using by another program..."
Abort
${EndIf}
但是,我无法在该端口上找到正在运行的进程。我需要给出一条错误消息,例如
//Skype is running on port 80 and close Skype to continue with the installation.
有人可以帮我解决这个问题吗?谢谢。
【问题讨论】:
标签: installation nsis port80