Jump to content

Recommended Posts

Posted

Ok, we are trying to make some changes in our sysprep image, but nothing I do seems to take effect.

Here is what we are trying to do:

1) In Network Settings/Local Area Connection, UNCHECK the checkbox beside "File and Printer Sharing for Microsoft Networks" (Basically Unbind it from the Adapter, NOT remove it, just unbind it).

2) In TCP/IP properties, under Advanced/DNS, UNCHECK the "Register this connection's address in DNS".

This is for a image that will be installed on various systems with various NICs, so the adapter will be different, so I need some way, to set it in the Sysprep.inf.

I'm sure someone has had to do this before and could give some pointers?

TIA.


Posted

Well this should do half of it:

UNCHECK the "Register this connection's address in DNS"

On Error Resume Next

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20

arrComputers = Array("localhost")
For Each strComputer In arrComputers
  Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
  Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration where IPEnabled=TRUE", "WQL", _
                                         wbemFlagReturnImmediately + wbemFlagForwardOnly)

  For Each objItem In colItems
     result=objItem.SetDynamicDNSRegistration(False,false)
  next
next

See Win32_NetworkAdapterConfiguration for the return codes.

0= success no reboot,

1=success need reboot,

anything else is an error.

Posted
Well this should do half of it:

Thanks, it works great.

I'd still like to have a way to do it from the settings in Sysprep.inf if anyone has one. (Mainly so I can see what the heck I am missing.) :P

Posted

Try this, but it will only work for one adapter:

Add to sysprep.inf

[Net Adapters]
   Adapter1 = params.Adapter1
[NetBindings]
   Disable = MS_Server Adapter1
[MS_TcpIP]
   EnableAdapterDomainNameRegistration=No

Posted (edited)
Try this, but it will only work for one adapter:

Add to sysprep.inf

[Net Adapters]
   Adapter1 = params.Adapter1
[NetBindings]
   Disable = MS_Server Adapter1
[MS_TcpIP]
   EnableAdapterDomainNameRegistration=No

As is, I got a invalid entry, so I modified it slightly to be [NetAdapters],

and "MS_Server Adapter1", but it had no effect on the end result, the boxes were still checked.

Thanks for your help & suggestions.

Edited by Joe User 99
Posted
If this can help you ... I use GetMac to retrieve all "connection name" and IBindCFG to disable/enable binding of ms_msclient and ms_server on those nic interfaces ... even with virtual card !

Thanks, but IBindCFG seems to have no effect either.

I tried it by hand on a 2003 SP1 server, and on a XP SP2 vm session, and while there were no errors, the items remain checked in the network properties.

Using IBindCFG -interface "Local Area Connection" -dis_service ms_server

as the command line from the C:\ prompt.

Posted

Ok, I got part of it working through straight sysprep.inf.

While looking up something else, I stumbled accross this KB article:

The InstallDefaultComponents Key in the Networking Section Always Defaults to Yes

So, I checked it out, and it has sample sysprep.inf, that I modified to suit my needs. So, now I have got the unbind file and print sharing working through sysprep, and I am using the vbs file that IcemanND was kind enough to share, and I am up and working.

I'll continue testing it, but for now I am satisfied. Thanks for everyones help and suggestions.

Posted

As an addition to the MS article you have linked, for a winnt.sif file, use

[Networking]
   InstallDefaultComponents = No

Posted
As an addition to the MS article you have linked, for a winnt.sif file, use
[Networking]
   InstallDefaultComponents = No

If you notice however, the title for the article I linked to was:

The InstallDefaultComponents Key in the Networking Section Always Defaults to Yes.

Basically, it says setting it to No has no effect.

the InstallDefaultComponents entry in the [Networking]section always defaults to "Yes" regardless of the value set in the Answer file. 
Posted

It may for sysprep.inf, I'll not argue with you there, however to the best of my knowledge it has always worked correctly on my installs in winnt.sif. I thought I would just re-iterate the point for those mistaking the sysprep and winnt methods.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...