Question : Question About Windows 7 Sysprep

I am trying to build an image that I can roll out to all computers at work (they're all identical).  it would seriously be quicker to go round manually than try and work out Windows 7 sysprep!

Basically, I am using WDS on Server 2008 R2 to deploy the images. I have got the vanilla install.wim added and going OK, so I use this to install Windows to the reference machine. When the first welcome screen appears during setup, i'm pressing Shift+Ctrl+F3 to go into Audit Mode. I install all my apps and drivers and do any other customizations etc then run sysprep with the generalize option.

However on reboot, it persists on asking for a local username no matter what I specify in the unattend file. It also seems to join the domain with a random computer name, then changes it as part of the username prompt, which means I can't join the domain when it's finished.

So how do I sort this out. After running sysprep I want it to prompt me for a computer name, then join the domain and reboot, leaving it ready to be logged on to. Nothing else.

I am using WSIM to build my xml files. Any advice?

Answer : Question About Windows 7 Sysprep

Ive used this guide before and it works well

http://blog.brianleejackson.com/sysprep-a-windows-7-machine-%E2%80%93-start-to-finish-v2

I find this script works for auto joining to a domain

Const JOIN_DOMAIN = 1
Const ACCT_CREATE = 2

strDomain = "contoso.com"
strUser = "deployment"
strPassword = "K3UWtn4ru72j"
strOU = "OU=Deployment Project,DC=contoso,DC=com"

Set objNetwork = CreateObject("WScript.Network")
strComputer = objNetwork.ComputerName

Set objComputer = GetObject("winmgmts:{impersonationLevel=Impersonate}!\\" &
strComputer & "\root\cimv2:Win32_ComputerSystem.Name='" & strComputer & "'")

objComputer.JoinDomainOrWorkGroup strDomain, strPassword, strDomain & "\" &
strUser, strOU, JOIN_DOMAIN + ACCT_CREATE

Invoke it on the first run after auto login
Random Solutions  
 
programming4us programming4us