[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2006-10-30
5
Medium Priority
?
3,309 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 1200 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

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!    …
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
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…

831 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