I need to check if a TCP/IP route already exists from my application and add the route if it doesn't. Now I'm running the
route add <destination network ip address> MASK <mask> <gateway ip address>
with a Process.Start() and that's fine for me. However, as I'm elevating the route command with a "runas" verb, I need to check first if the route is already configured in order to avoid running the elevated command again.
Does anybody know how to get the TCP/IP routing information using .NET Framework? (I don't want to run route print with a Process.Start() and parse the output)
Thank you in advance!!