Solved

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

Posted on 2006-10-30
5
3,157 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
essaydave -- I will take a look at this a little later today and get back to you.

thanks.

0
 

Author Comment

by:jrmcnulty
Comment Utility
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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

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…
cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now