We wrote a script last year that uses netsh to fix up our network configuration when it gets hosed (our development PCs have two NICs, one to the school network, one dedicated for robots). We have the fun wrinkle that our school is using 10.x.x.x, so when the Driver’s Station changes the network mask for the robot NIC to 255.0.0.0, we lose Internet.
We are getting school PCs moved over to Windows 7, and we can no longer use the “netsh” command to fix up addresses and network masks (unless run as administrator).
The Driver Station is able to fiddle with the network settings on W7: how does it do that? We need to emulate it…
It is allowed to do so because it is signed and has a manifest that gives it admin privileges. My search results indicate that runas may allow you to do the equivalent things as sudo to your script.