Question: I have a customer that uses a VPN connection, however it automatically configures my DNS settings to a non-existent DNS server, meaning every DNS resolution times out until the alternative is tried, which really slows down all Internet traffic.

Is there a way that I can prevent an application from overriding my DNS settings (without enabling UAC)? 

Alternatively, is there a way that I can set up some kind of local routing that says 'when a DNS request for IP address A comes in, actually use IP address B'?

I'm using Windows 8 Developer preview (but I suspect it should work the same as Windows 7).

Thanks

Answer: 
Unfortunately netsh can not delete dns servers assigned by dhcp. But this can be done by clearing DhcpNameServer parameter in 

```
HKLM\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\{id}

```

registry key.
> 
> Is there a way that I can prevent an application from overriding my DNS settings (without enabling UAC)? 
> 
> 
> 

At least there is no easy way to do that.

> 
> Alternatively, is there a way that I can set up some kind of local routing that says 'when a DNS request for IP address A comes in, actually use IP address B'?
> 
> 
> 

You can add entries to the hosts file (`C:\Windows\System32\drivers\etc\hosts`). This file contains mappings from host names to IP addresses and is preferred over DNS requests.