Question: Is there a way to automate (like a batch file or something) that can be ran at startup to automatically append dns suffix? rather than using the gui everytime the machine reboots?
6/9/2008 11:18:20 PM
SET WSHShell = CreateObject("WScript.Shell")WSHShell.RegWrite "HKLM\System\CurrentControlSet\Services\TCPIP\Parameters\SearchList","your.com,domain.com,list.com,here.com","REG_SZ"save as something.wshvoila[Edited on June 9, 2008 at 11:26 PM. Reason : are you talking about the search list or the connection suffix?]
6/9/2008 11:23:52 PM
connection suffix, got it. ended up doing more google fu and found a vbscript for it. thanks for pointing in the right direction though.
6/10/2008 4:27:30 AM
::~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:://////////////////////////////////////////////////////////|::%%%%%%%((((( HOSTS Entries and DNS Suffixes )))))%%%%%%%|::\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\|::~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Set tempPATH=whereeverAttrib -R %windir%\system32\drivers\etc\HOSTSecho 127.0.0.1 localhost > %windir%\system32\drivers\etc\HOSTSecho 127.0.0.1 %computername% >> %windir%\system32\drivers\etc\HOSTSecho 127.0.0.1 %computername%.demo >> %windir%\system32\drivers\etc\HOSTSecho 127.0.0.1 %computername%.demo.mydomain >> %windir%\system32\drivers\etc\HOSTSecho 127.0.0.1 %computername%.demo.mydomain.com >> %windir%\system32\drivers\etc\HOSTSecho Windows Registry Editor Version 5.00 > %tempPATH%\dnsSuffix.regecho [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters] >> %tempPATH%\dnsSuffix.regecho "Domain"="demo.mydomain.com" >> %tempPATH%\dnsSuffix.regecho "SearchList"="demo.mydomain.com,mydomain.com" >> %tempPATH%\dnsSuffix.regecho "NV Domain"="demo.mydomain.com" >> %tempPATH%\dnsSuffix.regREG import %tempPATH%\dnsSuffix.reg[Edited on June 11, 2008 at 7:22 AM. Reason : probly want to at a del %tempPATH%\*.reg and save as .bat][Edited on June 11, 2008 at 7:26 AM. Reason : put an entry in HKLM\Software\Microsoft\Windows\CurrentVersion\Run that calls the bat at login]
6/11/2008 7:21:02 AM