Lee Reid
May 18th, 1999, 12:11 PM
Programmatic Ping requires Administrative Privileges:
We implemented a programmatic ping utility inside an in-process COM server to allow client applications to see if a particular Windows station exists at a given IP Address. We used a Microsoft WinSocket sample called "ping" that showed how to use the SOCK_RAW socket type with ICMP protocol. All software is for WindowsNT 4.0 using Winsock 2.
It works great except for the fact that we recently discovered that the SOCK_RAW socket type requires administrative privileges in the users account in order to function. This is documented in Microsoft's Winsock documentation describing raw sockets.
We notice, however, that even without administrative privileges we can use the "ping" command from the Command Prompt in WindowsNT and it works properly. So there must be a way to ping a device even without administrative privileges.
Can anyone recommend an approach that will work regardless of the user account privileges?
thanks
Lee
Lee Reid
We implemented a programmatic ping utility inside an in-process COM server to allow client applications to see if a particular Windows station exists at a given IP Address. We used a Microsoft WinSocket sample called "ping" that showed how to use the SOCK_RAW socket type with ICMP protocol. All software is for WindowsNT 4.0 using Winsock 2.
It works great except for the fact that we recently discovered that the SOCK_RAW socket type requires administrative privileges in the users account in order to function. This is documented in Microsoft's Winsock documentation describing raw sockets.
We notice, however, that even without administrative privileges we can use the "ping" command from the Command Prompt in WindowsNT and it works properly. So there must be a way to ping a device even without administrative privileges.
Can anyone recommend an approach that will work regardless of the user account privileges?
thanks
Lee
Lee Reid