PDA

View Full Version : A few questions



kevinb
06-16-2011, 04:24 PM
Hey Friedrich, been a while! :o I'm working on an installer for an open source project I'm involved in and have a few questions on how to accomplish a few things.

1) I need to check the availability of ports prior to actual install, and if they are NOT available (already in use) I want to pop up a dialog to inform the end user and have them choose to continue or abort. Is this doable?

2) When uninstalling I need to run a specific batch file BEFORE the actual uninstall process starts, to make sure all services for the software are shut down before uninstall to make sure there are no issues. I'm not sure how/where to run this script before the uninstall happens, so if the user clicks "uninstall app xxx" it launches the script first, waits for it to exit, and then runs the actual uninstall.exe

Thanks!

Kevin Bednar

linder
06-17-2011, 01:20 AM
Hi Kevin,

Long time no hear. I hope you are doing fine :)

1) Do you mean the available parallel ports or listening TCP/IP ports (similar to what netstat.exe provides)?

2) No problem! Just add a custom uninstall include script to your project and run the batch file before you process the "Process Uninstall Queue" script function. See attached screenshot. Does this help?

Friedrich

kevinb
06-17-2011, 05:44 AM
Hi Kevin,

Long time no hear. I hope you are doing fine :)
Doing well, and I hope everyone there is also well!

1) Do you mean the available parallel ports or listening TCP/IP ports (similar to what netstat.exe provides)?
TCP/IP ports. I would like to check for tcp port 80 and 3306 being in use and raise a dialog window with some information based on the ports status (in use or free)

2) No problem! Just add a custom uninstall include script to your project and run the batch file before you process the "Process Uninstall Queue" script function. See attached screenshot. Does this help?
This looks like it will work fine as all I am doing is running a batch file that stops a few processes. Is there a way to raise an information dialog prior to running the command line, to inform them, like "We will now stop all running services, blah, blah.." and have it continue when they press Ok?

Thanks!

Friedrich

See comments above.

Kevin

linder
06-17-2011, 05:57 AM
Hi Kevin,


Is there a way to raise an information dialog prior to running the command line, to inform them, like "We will now stop all running services, blah, blah.." and have it continue when they press Ok

Sure. Just display a Message Box with YES and NO buttons and then use an If... Statement (see attached screenshot).

Friedrich

kevinb
06-17-2011, 06:01 AM
Thanks I'll give that a try and let you know how I make out.

Kevin

linder
06-17-2011, 08:09 AM
Kevin,


TCP/IP ports. I would like to check for tcp port 80 and 3306 being in use and raise a dialog window with some information based on the ports status (in use or free)

We have an internal library to check the status of ports (e.g. established, listening, etc.). But I am not sure if this is what you are looking for.

Friedrich

kevinb
06-17-2011, 08:19 AM
Kevin,



We have an internal library to check the status of ports (e.g. established, listening, etc.). But I am not sure if this is what you are looking for.

Friedrich

That would probably be all I need. The software runs on a WAMP stack, so during install I's like to check that port 80 and 3306 are not in use, and if they are then just display a dialog and let the user know what they will experience problems running the system if the ports are already in use. If they are available during the port check then the install continues without any warning dialog.

linder
06-17-2011, 08:30 AM
That would probably be all I need. The software runs on a WAMP stack, so during install I's like to check that port 80 and 3306 are not in use, and if they are then just display a dialog and let the user know what they will experience problems running the system if the ports are already in use. If they are available during the port check then the install continues without any warning dialog.

That "portstat" add-on will be a SB8 feature -- I'll see if I can backport the interface from SB8 to SB7 this weekend.

Friedrich

kevinb
06-17-2011, 08:33 AM
Thanks buddy, but you don't need to do that! Enjoy the weekend with the wife and daughter! :)

Kev

linder
06-17-2011, 08:45 AM
:)

Friedrich