Ok, this won't work for Win9x, but a much more robust solution for Win2k/XP is the following:
in reply to Change Windows DNS Settings
Look at the netsh for more options and details. There is a ton of stuff you can do with netsh including changing IP's, netmasks, routes, adding deleting (non-LAN) interfaces, etc.
netsh interface ip add dns "Local Area Connection" 10.10.10.10 index=1
netsh interface ip delete dns "Local Area Connection" 10.10.10.10
"Nothing is sure but death and taxes" I say combine the two and its death to all taxes!