Solved

Script or Batch program to disable ie uncheck "Register this connection's addresses in DNS"

Posted on 2006-10-30
5
3,197 Views
Last Modified: 2007-12-19
Okay guys,

I have been searching and testing and can not find anything that will help. What I want is to have a script/batch file that I can run after Sysprep that will uncheck "Register this connection's addresses in DNS" and uncheck the "Enable LMHOSTS lookup"

I use the default network settings in the Sysprep and of course those setting go back to the defaults. I know I can just go and uncheck them, but I was hoping for some thing a little more elegant.

Thanks
0
Comment
Question by:jrmcnulty
  • 3
5 Comments
 
LVL 7

Expert Comment

by:sj_hicks
ID: 17840795
To change dynamic DNS registration:
http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx?mfr=true
Not sure about LMHOSTS setting.
0
 
LVL 6

Accepted Solution

by:
essaydave earned 300 total points
ID: 17842819
Hiya

Change the yourdomainnamehere part, save this as a .vbs file, and set it to run at startup.  Voila!

NOTE: - I'm pretty flat out here at work, but if you want explanations, I can come back in a couple of days and explain the parts :)

----------------------

On Error Resume Next

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
 & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objNicConf = objWMIService.Get("Win32_NetworkAdapterConfiguration")

intWinsEnable = objNicConf.EnableWINS(True, False, "", "yourdomainnamehere")

Set colNicConfigs = objWMIService.ExecQuery _
 ("SELECT * FROM Win32_NetworkAdapterConfiguration")

For Each objNicConfig In colNicConfigs
      intDNS = objNicConfig.SetDynamicDNSRegistration(False, False)
Next

--------------------------------
0
 

Author Comment

by:jrmcnulty
ID: 17842833
Okay that is a start. But, but your link only points to the scripting center. What script were you thinking about?
0
 

Author Comment

by:jrmcnulty
ID: 17842847
essaydave -- I will take a look at this a little later today and get back to you.

thanks.

0
 

Author Comment

by:jrmcnulty
ID: 17844149
essaydave -- looks to work. points will be awarded.
An explainations would be good. I believe that in your first object

intWinsEnable = objNicConf.EnableWINS(True, False, "", "yourdomainnamehere")

True = WINS Enabled
False = LMHOSTS disabled
"" = Location of LMHOST file
"yourdomainnamehere" = Scope ID

for second object

intDNS = objNicConfig.SetDynamicDNSRegistration(False, False)

False = FullDNSRegistrationEnabled -- which is the unchecking of "register this connection's address in DNS"
False = DomainDNSRegistrationEnabled which is the default right?

Let me know if I am on the right track.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
It is only natural that we all want our PCs to be in good working order, improved system performance, so that is exactly how programs are advertised to entice. They say things like:            •      PC crashes? Get registry cleaner to repair it!    …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question