Since the Metro environment on Windows 8 lacks most of the .NET framework class libraries or contains a substancially pared down version, is it possible to execute a "ping" from a Metro style application? There is support for Sockets, so I guess there is hope, but I don't know where to start, since every "C# Ping" example uses System.Net.NetworkInformation.Ping
and that is not available in WinRT.
I also looked into the source code for Mono, and their ping implementation fires up ping.exe and returns the result from the standard output window of the command line.
No, unfortunately not. ICMP is not supported in WinRT:
IcmpCreateFile
and related Win32 APIs are only available in the "desktop" API partition. ICMP can be implemented using raw sockets but since these are not supported in WinRT (and usually require elevation, anyway), this option is also not available to you.As the developer of a Windows Store network scanning tool myself (http://lanscan.rcook.org/), I'd love to be able to do this.