Hey all

When using sysprep, after the image has been pushed and initialized, when you log in the first time some things are set back to default that I don't want

There are about 6 items in the start menu that we remove, disable file and print sharing, add a check box to "Use this connection's DNS suffix in DNS registration" and a couple of other odd and ends

Can someone give me some insight on how to script this so that I don't have to do it a 100 machines when I image them

Thank
Matt

Re: XP start menu and removing items from list by Marty

Marty
Thu Apr 29 15:26:45 CDT 2004


"Matthew Bauer" <anonymous@discussions.microsoft.com> wrote in message
news:2E5FF550-5A69-4D75-B6E4-C43A42445D09@microsoft.com...
> Hey all,
>
> When using sysprep, after the image has been pushed and initialized, when
you log in the first time some things are set back to default that I don't
want.
>
> There are about 6 items in the start menu that we remove, disable file and
print sharing, add a check box to "Use this connection's DNS suffix in DNS
registration" and a couple of other odd and ends.
>
> Can someone give me some insight on how to script this so that I don't
have to do it a 100 machines when I image them.
>
> Thanks
> Matt


#1 Start Menu
There may be better ways of doing this, but to clean out the recent programs
on the Start Menu, delete all subkeys of these two registry keys, and then
log out or reboot:

"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{5E6AB78
0-7743-11CF-A12B-00AA004AE837}\Count\"

"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{7504870
0-EF1F-11D0-9888-006097DEACF9}\Count\"

(Or it might be easier to delete the entire tree and then add back an empty
key)



#2 File and Print Sharing
This seems like it would be easier to do on your image, but if you need to
do it on the clone you should stop the "Server" service and set it to
disabled. You should do this using SC.EXE, or you could cheat and set this
registry value and reboot:
Key: HKLM\System\CurrentControlSet\Services\LanmanServer\
Value name: Start (REG_DWORD)
Value data: 4



#3 DNS Suffix registration
You should try to do this through WMI or maybe NETSH.EXE or you could cheat
and do it in the Registry and reboot:
Key:
HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{<insert
GUID here>\
Value name: DisableDynamicUpdate
Value data: 1


Hopefully this gets you started in the right direction.





Re: XP start menu and removing items from list by Marty

Marty
Thu Apr 29 15:30:22 CDT 2004


Sorry, I gave you the wrong registry value. Instead of
"DisableDynamicUpdate" use "EnableAdapterDomainNameRegistration".




Re: XP start menu and removing items from list by anonymous

anonymous
Fri Apr 30 09:26:02 CDT 2004

Thanks for the response. I do get rid of file and print sharing before I sysprep, and yet it still comes back. I am NOT allowing XP sysprep to search for PNP devices so that it won't cause issues with the network card and sound yet it still adds the file and print sharing and removes the check for DNS registration

It may be like that by design

Thank
Matt

Re: XP start menu and removing items from list by anonymous

anonymous
Fri Apr 30 14:46:04 CDT 2004

Do you want me to add registry key's? The last two don't appear to be there

Thank
Matt

Re: XP start menu and removing items from list by Marty

Marty
Fri Apr 30 21:34:20 CDT 2004


"Matthew Bauer" <anonymous@discussions.microsoft.com> wrote in message
news:9DFA9984-F241-42FC-8C86-67AC968962C4@microsoft.com...
> Do you want me to add registry key's? The last two don't appear to be
there.
>
> Thanks
> Matt

I'm not sure what you mean by "the last two". You shouldn't need to add any
registry KEYS, but you might need to add the registry VALUE
"EnableAdapterDomainNameRegistration". This would be under each adapter's
unique ID or GUID, you would need to enumerate each subkey.

If you're not familiar with this part of the registry, it would be unsafe to
make changes, especially from a script. WMI would be a safer way to go, but
I don't know if that property is supported. I'll look into and let you
know. Here's a starting point:
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/wmi_classes.asp




Re: XP start menu and removing items from list by anonymous

anonymous
Sun May 02 10:46:03 CDT 2004

Thanks for the link

I got this to work to set the connection registration in DNS portion that we discusse

On Error Resume Nex

strComputer = ".
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2"
Set colNetCards = objWMIService.ExecQuery ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True"
For Each objNetCard in colNetCard
objNetCard.SetDynamicDNSRegistration true, tru
Nex

Matt