• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 411
  • Last Modified:

Windows 7 Ping works from command line but not in homegrown application

The company I work for has an application that was developed in house that uses the ping command.  Here is a description of the problem as written by company product support:

"For some time now we have been plagued with problems using SNMP devices on certain loads.
The Traps, GETs, SETs, and MIB walk all work fine.

The problem is with the "Ping" command issued by the application periodically to each SNMP network element (NE) to verify its presence on the network.
As soon as the application begins operations, it attempts to "Ping" each NE, and it continues to do so once each minute (user adjustable) forevermore.

On most installations (post Windows XP), this results in a "Socket Initialization Error" (this is what we see in the debug window)."

All computers that are running the application can successfully ping targets from the command line.  But the ping initiated from the application fails.  The application is currently working on one Windows 2008 Server and one Windows 7 64-bit PC but we cannot find a difference between these installations and the ones where the application does not work.  The problem occurs in both 32 and 64 bit versions of Windows 7.  I have disabled Windows Firewall and removed Symantec Endpoint Protection from a test PC but the results have not changed. I have also tried disabling IPv6.

I am at a complete loss.  Any ideas?
  • 3
1 Solution
well, did this at some point work with windows 7 pcs or did this set up never work at all?

from my perspective this is related to the application - as long as the code is at fault there is not much you can do..

hand this back to the programmers - maybe they can extrapolate the error seen here.

as to WHY this is happening:  i'm not good at intepreting but it seems to me that the program tries to access windows features but cannot because the way of addressing them as changed?
there SHOULD be also a change report from microsoft on this - just my guessing can't help you much here, sorry.
HankCashAuthor Commented:
The application does work on some Windows 7 computers. If it didn't work at all the problem would be more clear cut.  There will not be any further development of the application for reasons that I shouldn't get into.
HankCashAuthor Commented:
I solved the problem.  The application needs to be running in XP Compatibility Mode in order for the ping function to work correctly.

Some installations of the application had already been set to work in Compatibility Mode because of an earlier problem we found where the application would only work when being run by the same user who did the install.  Setting the application to run in XP SP2 Compatibility Mode solved this problem as well.
HankCashAuthor Commented:
I selected my solution because it solved the problem.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now