anyone know how to change network settings like default gateway and DNS?
my first idea was to do it from the registry but i read somewhere that
it is not good and if OS specific any ideas? thanks

c++

Recommended Answers

May I ask why you would like to do that? It doesn't sound like a program that I would like to have run on my PC..

Jump to Post

All 4 Replies

May I ask why you would like to do that? It doesn't sound like a program that I would like to have run on my PC..

In general, there are command line utilities for this specific to each system route on linux/windows, for example (although very different considering the same name). Writing this in C++ would require that you plug into the networking internals of your particular system making it non-portable.
The best you might achieve is to determine the host in C++ and execute the actual platform specific shell command from there.

I want to make it for use at internet cafe's where they have several modems
and when a connection is slow i just change the gateway

There are specific utilities built into server operating systems for just this kind of task.

Also, I'm pretty sure Google will produce results of a piece of software pre-built. I only suggest this because you seem interested only in the business solution and not the process of creation.

If you can't find a pre-built solution, then scripting will be better than coding (VBScript)

But seriously, Windows Server 2003 I believe has traffic management and network aggregation and if not Windows Server 2008 definitely does have it as I use it at work =)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.