This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to test if IP Address is accessible
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 11, 2011
04:27 PM
How to test if IP Address is accessible
I have a custom dialog that allows the user to enter either an IPv4 or IPv6 address. How can I test to see if that IP Address is accessible?
Thanks,
Greg
Thanks,
Greg
(6) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 11, 2011
05:13 PM
What does "accessible" mean for your needs? Does it need to be accessible via broadcast (i.e. does it just need to be on the local network)? Does a particular service need to be up and running and responding? Are there any APIs you can call to check this?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 11, 2011
05:23 PM
Well, I guess that is part of the battle. This will always be on the local network (internal) so I would think that a PING would suffice but it could be that they have that disabled via their firewall settings so I'm not really sure there is a sure way to test if an IP address is "alive". The design is also to let the installer have the choice of going back to edit the IP if one can't be found, or to continue, which in my opinion kind of defeats the purpose of testing it in the first place.
The dialog basically allows the user to specify the IP address of a SQL Server database server.
The dialog basically allows the user to specify the IP address of a SQL Server database server.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 11, 2011
05:42 PM
I'm not our SQL Server expert, but that sounds like it would be handled by our SQL dialogs if you're using our SQL support. I guess if you're just trying to check for the existence of the server (as opposed to running actual scripts) they may not be the best fit. Is it worth writing some InstallScript code that connects to the database at that IP address, to verify it's correct, firewall, user permissions and more?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 11, 2011
05:54 PM
I don't need to do anything with server except check its existence with either ipv4 or ipv6 and then store the address in the registry. Also the user could continue without it existing so I just need to know how to query the server. If the server exists doesn't mean that a database will exist.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 12, 2011
10:42 AM
Since I am really wanting to test to see if a database server is online or not, I have a few questions:
1) Is it neccessary to specify an IP address for the server? Meaning, if I specify the computer/instance name will that resolve the IP address for me?
2) If I just need an instance name and use the SQLServerSelect dialog, is there a way to continue past the dialog if it can't connect to it?
Thanks,
Greg
1) Is it neccessary to specify an IP address for the server? Meaning, if I specify the computer/instance name will that resolve the IP address for me?
2) If I just need an instance name and use the SQLServerSelect dialog, is there a way to continue past the dialog if it can't connect to it?
Thanks,
Greg
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 07, 2011
03:04 PM
function checkIPAddress( svIP )
NUMBER n;
begin
RegDBDisConnectRegistry( 0 ); // in case it's already open
n = RegDBConnectRegistry ( svIP, HKEY_LOCAL_MACHINE, 0 );
RegDBDisConnectRegistry( 0 );
return n;
end;
NUMBER n;
begin
RegDBDisConnectRegistry( 0 ); // in case it's already open
n = RegDBConnectRegistry ( svIP, HKEY_LOCAL_MACHINE, 0 );
RegDBDisConnectRegistry( 0 );
return n;
end;