Question

I need to add a route into the IP4 routing table on windows xp.

However, the Win32_IP4RouteTable class seems to only be able to query existing routes.

Basically I need the same functionality as:

route ADD 192.168.127.254 MASK 255.255.255.255 192.168.1.10

Is it possible to use WMI to add an entry into the IP4 routing table?

Could I use CreateProcess instead?

Was it helpful?

Solution

Do you need solution on WMI only? I usually use IPHelper. Specifically, you need CreateIpForwardEntry function.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top