In a Win7 computer that belongs to a domain, how to append DNS search list entries

dhcpdomain-name-systemwindows 7

My desktop is part of the company domain and receives its IP address and DNS search list via DHCP. That's fine, of course. Is there a way that I can append additional entries to the end of the DNS search list that I got via DHCP?

When I bring up the NIC adapter settings for TCP/IP v4, of course it is set to obtain IP address and DNS server address automatically. Opening "Advanced" and clicking on the DNS tab, the DNS search list configuration is greyed out.

Is there a command or script I can run each time I boot to append to the end of the DNS search list that I get via DHCP?

My goal is to avoid having to type out long fully-qualified names for additional domains I frequently access (in our labs) that the company doesn't want to add to the DNS search list that everyone gets via DHCP.

Edit: In Linux, the configuration to do what I am looking for is easy. You configure either the DHCP client or the network interface itself to append or prepend or supersede the search list you get via DHCP. For an example of how to do in Linux what I am trying to do in Windows, see https://superuser.com/a/264032/2505 or http://jurjenbokma.com/ApprenticesNotes/domain_search_override.html

Does the lack of answers mean that this trivial configuration in Linux is not possible in Windows 7?

Best Answer

I found a way to do this which is probably a workaround and which won't work on a locked-down box where you don't have admin rights. Edit the registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient\SearchList

Add to the end of that key any domains you want to add to your search list -- although this key may entirely replace your search list. This list should be comma-separated with no whitespace.

After making the change, you have to renew your DHCP lease as a way of getting the DHCP client to run so you can apply the change:

ipconfig /registerdns

Once you have done this, you'll have the new entries in your DNS search list.