I am trying to create a setup file, so that during installation it will check a port, say 9000, and let user know the port status. I am new to Inno Setup and wonder if this is possible, and how would I check for this?
Thank you
I am trying to create a setup file, so that during installation it will check a port, say 9000, and let user know the port status. I am new to Inno Setup and wonder if this is possible, and how would I check for this?
Thank you
For windows 2000, xp versions you can use telnet command, if win 7, vista, the telnet is not enabled by default, the user needs to enable it from control panel or you can use
pkgmgr /iu:"TelnetClient"
to enable it thru command line. from inno you can check the windows version and run the commands accordingly.The only real way to see if a port is available is to try connecting or listening to it (depending on what kind of availability you're checking for).
You can do this with WinAPI calls directly, but you'd probably find it easier to write the code to test the port into a DLL using the language of your choice (provided that it can create native DLLs of course), and then call this from within Inno.
you can use my function to check a port is available
see :