tags:

views:

16

answers:

1

Hi, I am creating an application that is connecting to another computer through an Ethernet cable in XP. I need to execute the network setup wizard to setup a local area connection (with File sharing Turned On) and then set static ips and the default gateway; all this programmatically using C#. How can this be achieved?

A: 

You should be able to do this with INetCfg as described here. It's a Win32 API so you'd have to use PInvoke, as discussed here, and you should be able to find samples for calling it from C# by a search for INetCfg and C# or similar.

ho1