I am a newcomer to AI (v11.2 Enterprise) and have need for my installer to check two or three ports pre install; if the port(s) is in use pop a dialogue alerting the user and failing the install.
AI has a handy CheckTcpPort custom action, but I am running into a problem where it reports the port free when it does not appear to be.
I am running the AI sample project from here and testing port 80. Port 80 is bound to a local Apache instance and Windows netstat -a shows the port as LISTENING.
Code: Select all
netstat -a
Active Connections
Proto Local Address Foreign Address State
TCP 0.0.0.0:80 LEONARDL-DT:0 LISTENINGCode: Select all
Action 12:21:56: CheckTcpPort. Dialog created
MSI (c) (7C:6C) [12:22:01:158]: PROPERTY CHANGE: Adding AI_BIND_TCP_PORT property. Its value is '80'.
MSI (c) (7C:6C) [12:22:01:252]: Doing action: CheckFreeTCPPort
Action 12:22:01: CheckFreeTCPPort.
Action start 12:22:01: CheckFreeTCPPort.
MSI (c) (7C:F4) [12:22:01:267]: Invoking remote custom action. DLL: C:\Users\leonardl\AppData\Local\Temp\MSI6906.tmp, Entrypoint: CheckFreeTCPPort
MSI (c) (7C!94) [12:22:01:267]: PROPERTY CHANGE: Adding AI_PORT_TEST_RES property. Its value is 'FreePort'.
Action ended 12:22:01: CheckFreeTCPPort. Return value 1.
FOLLOW US
Get the latest news in Application Packaging