BatchFile Posted March 11, 2011 Posted March 11, 2011 I'm trying to create a good Win7 image while I've got time to do it. For a goodly few years we've had Win XP imaging off to a fine art with sysprep and an answer file, you simply deploy the image by whatever means (we use all of Imagex, Ghost and remove-the-hard-disk-and-bung-it-in-another-pc), reboot the machine and it prompts for any items not specified in the answer file, most usefully the computer name. 10 mins flat and you have a PC correctly named (typos permitting) back in the domain, ready to go. 7 and Vista seem incredibly clunky in this regard - but I've followed bits of this: How To Image and Deploy Windows 7 a Complete Guide - Using sysprep and imagex and used the tool on the site to generate an unattend.xml file in which I've put all the data items, except computer name. BUT On reboot, there doesn't seem to be any prompting for missing items - instead, what I get is a randomly named machine in a workgroup with the same name as the domain I specified in unattend.xml:mad:. Long story short, is there a way of getting 7 to prompt for a computer name on the first boot after sysprepping, like there used to be in XP?
RHaynes Posted March 11, 2011 Posted March 11, 2011 We were looking into this, I dont believe there is a way. Let me know if im wrong lol
kennysarmy Posted March 11, 2011 Posted March 11, 2011 Interested in this too: We have tested our W7 policies and now wish to try replicating: I think we need to : 1. Build up PC with all settings. 2. Copy an unattend.xml to the sysprep folder. 3. Run command : sysprep /generalize /oobe /shutdown /unattend:unattend.xml 4. Shutdown the PC. 5. Boot using bootable CD and ghost PC to it's D:\ partition. There is some stuff on this site: Sysprep a Windows 7 Machine ? Start to Finish - The IT Bros about the XML file But it's completely new to me so any help appreciated. 1
BatchFile Posted March 11, 2011 Author Posted March 11, 2011 Ah ha! that's the stuff!! If you want the sysprep to prompt for a computer name you need to remove a line from your XML file. Open up your XML file you saved with notepad and remove the following line: I'm on it - will post the results here
BatchFile Posted March 11, 2011 Author Posted March 11, 2011 ...or not. Same result as before any more ideas, anyone?
BatchFile Posted March 11, 2011 Author Posted March 11, 2011 Interested in this too: We have tested our W7 policies and now wish to try replicating: I think we need to : 1. Build up PC with all settings. 2. Copy an unattend.xml to the sysprep folder. 3. Run command : sysprep /generalize /oobe /shutdown /unattend:unattend.xml 4. Shutdown the PC. 5. Boot using bootable CD and ghost PC to it's D:\ partition. There is some stuff on this site: Sysprep a Windows 7 Machine ? Start to Finish - The IT Bros about the XML file But it's completely new to me so any help appreciated. Looks about right to me - not sure about the ghosting to D: bit as we don't use it like that, our site is small enough to get away with either imagex-ing or ghosting from a usb hdd as and when - or multicasting if I'm doing a whole room in the holidays. As I said above, XP goes like a dream doing this so it's a real letdown that 7 doesn't AFAIK... using the unattend.xml does improve matters somewhat however - at least all you have to do is log on locally after imaging, change the computer name and connect to the domain manually, but that's SO clunky comapred to minisetup in XP Thank goodness it's Friday
kennysarmy Posted March 11, 2011 Posted March 11, 2011 Does this help? Windows 7 Sysprep – Tips & tricks « TXT.bitprocessor.be 1
BatchFile Posted March 14, 2011 Author Posted March 14, 2011 Does this help? Windows 7 Sysprep – Tips & tricks « TXT.bitprocessor.be It might - it certainly renames the PCs ok, but doesn't join them to the domain I'm going to post my unattend.xml - can anyone see why it's not joining the domain? - - - - en-US 0409:00000409 en-US en-US en-US - - true CPS CPS - removed Never - - - true Work 1 true true GMT Standard Time - - fred true - - - removed true local account tony Administrators;Users; albus - 0409:00000409 en-UK en-UK en-UK - - ReplaceMe1 false CPS CPS - 32 1024 60 768 - - - cps removed removed
ces973 Posted March 14, 2011 Posted March 14, 2011 It might - it certainly renames the PCs ok, but doesn't join them to the domain I'm going to post my unattend.xml - can anyone see why it's not joining the domain? We had to enter a PowerShell command for ours to join the domain... shutdown /r /t 15 3 net user Admin2 /delete 2 C:\windows\system32\windowspowershell\v1.0\powershell.exe -command "Add-Computer -domainname DOMAIN -cred DOMAIN\Account" 1 true It asks us to join the domain right after it first boots into the 'Admin' account. The 'Admin2' account is just a junk account because you HAVE to create one in Win7. It then reboots 15 seconds after entering the domain credentials. Hope that helps some. 1
BatchFile Posted March 15, 2011 Author Posted March 15, 2011 Sorry being thick here as usual - where in the XML does that need to go? I tried putting it at the end and got an error "Windows cannot parse or process the answer file [c:\windows\panther\unattend.xml] for pass [specialize]. the answer file is invalid
Arthur Posted March 15, 2011 Posted March 15, 2011 The FirstLogonCommands section should go under Microsoft-Windows-Shell-Setup in the oobeSystem pass. However, your XML file is missing the JoinDomain and MachineObjectOU commands (shown below in red) which could be why it's not working. en-US 0809:00000809 en-GB en-US en-GB true CPS CPS removed Never true Work 1 GMT Standard Time ZgByAGUAZABBAGQAbQBpAG4AaQBzAHQAcgBhAHQAbwByAFAAYQBzAHMAdwBvAHIAZAA= false cgBlAG0AbwB2AGUAZABQAGEAcwBzAHcAbwByAGQA false local account tony Administrators;Users; albus 0809:00000809 en-GB en-GB 0809:00000809 ReplaceMe1 false CPS CPS 32 1024 60 768 true true false cps removed removed [color="red"]domain.com[/color] [color="red"]OU=Windows 7,OU=Workstations,DC=domain,DC=com[/color] 1 1
Arthur Posted March 15, 2011 Posted March 15, 2011 I forgot to mention, you may find the following two XML files useful for reference purposes. If the domain join still fails, there is a file called netsetup.log (in %SystemRoot%\Debug) which you can check for errors. http://www.msfn.org/board/topic/144257-unattend-will-not-join-domain/page__view__findpost__p__925604 http://pcloadletter.co.uk/2010/07/08/customizing-windows-7-unattend-xml/ 1
BatchFile Posted March 15, 2011 Author Posted March 15, 2011 Curiouser and curiouser! netsetup.log shows:03/15/2011 12:39:58:153 ----------------------------------------------------------------- 03/15/2011 12:39:58:153 NetpDoDomainJoin 03/15/2011 12:39:58:153 NetpMachineValidToJoin: 'TEST5RM2WIN7' 03/15/2011 12:39:58:153 OS Version: 6.1 03/15/2011 12:39:58:153 Build number: 7601 (7601.win7sp1_rtm.101119-1850) 03/15/2011 12:39:58:153 ServicePack: Service Pack 1 03/15/2011 12:39:58:153 SKU: Windows 7 Professional 03/15/2011 12:39:58:153 NetpDomainJoinLicensingCheck: ulLicenseValue=1, Status: 0x0 03/15/2011 12:39:58:153 NetpGetLsaPrimaryDomain: status: 0x0 03/15/2011 12:39:58:153 NetpMachineValidToJoin: status: 0x0 03/15/2011 12:39:58:153 NetpJoinDomain 03/15/2011 12:39:58:153 Machine: TEST5RM2WIN7 03/15/2011 12:39:58:153 Domain: cps\ALASTOR 03/15/2011 12:39:58:153 MachineAccountOU: OU=computers,DC=cps,DC=local 03/15/2011 12:39:58:153 Account: cps\administrator 03/15/2011 12:39:58:153 Options: 0x23 03/15/2011 12:39:58:153 NetpLoadParameters: loading registry parameters... 03/15/2011 12:39:58:153 NetpLoadParameters: DNSNameResolutionRequired not found, defaulting to '1' 0x2 03/15/2011 12:39:58:153 NetpLoadParameters: DomainCompatibilityMode not found, defaulting to '0' 0x2 03/15/2011 12:39:58:153 NetpLoadParameters: status: 0x2 03/15/2011 12:39:58:153 NetpValidateName: checking to see if 'cps' is valid as type 3 name 03/15/2011 12:39:58:262 NetpCheckDomainNameIsValid [ Exists ] for 'cps' returned 0x0 03/15/2011 12:39:58:262 NetpValidateName: name 'cps' is valid for type 3 03/15/2011 12:39:58:262 NetpJoinDomain: status of connecting to dc '\\ALASTOR': 0x0 03/15/2011 12:39:58:262 NetpJoinDomainOnDs: Passed DC 'ALASTOR' NOT verified as DNS name '\\alastor.cps.local' 03/15/2011 12:39:58:262 NetpJoinDomainOnDs: Passed DC 'ALASTOR' verified as Netbios name '\\ALASTOR' 03/15/2011 12:39:58:262 NetpLoadParameters: loading registry parameters... 03/15/2011 12:39:58:262 NetpLoadParameters: DNSNameResolutionRequired not found, defaulting to '1' 0x2 03/15/2011 12:39:58:262 NetpLoadParameters: DomainCompatibilityMode not found, defaulting to '0' 0x2 03/15/2011 12:39:58:262 NetpLoadParameters: status: 0x2 03/15/2011 12:39:58:262 NetpDsGetDcName: status of verifying DNS A record name resolution for 'alastor.cps.local': 0x0 03/15/2011 12:39:58:262 NetpProvisionComputerAccount: 03/15/2011 12:39:58:262 lpDomain: cps 03/15/2011 12:39:58:262 lpMachineName: TEST5RM2WIN7 03/15/2011 12:39:58:262 lpMachineAccountOU: OU=computers,DC=cps,DC=local 03/15/2011 12:39:58:262 lpDcName: ALASTOR 03/15/2011 12:39:58:262 lpDnsHostName: (NULL) 03/15/2011 12:39:58:262 lpMachinePassword: (null) 03/15/2011 12:39:58:262 lpAccount: cps\administrator 03/15/2011 12:39:58:262 lpPassword: (non-null) 03/15/2011 12:39:58:262 dwJoinOptions: 0x23 03/15/2011 12:39:58:262 dwOptions: 0x40000003 03/15/2011 12:40:19:307 NetpLdapBind: ldap_bind failed on alastor.cps.local: 81: Server Down 03/15/2011 12:40:19:307 NetpJoinDomainOnDs: Function exits with status of: 0x3a 03/15/2011 12:40:19:307 NetpJoinDomainOnDs: status of disconnecting from '\\ALASTOR': 0x0 03/15/2011 12:40:19:307 NetpDoDomainJoin: status: 0x3a "NetpLdapBind: ldap_bind failed on alastor.cps.local: 81: Server Down" worries me... I'm certainly not aware of a problem with this DC, though we have two others..... Should I be?!
Arthur Posted March 15, 2011 Posted March 15, 2011 According to this thread on the TechNet forums, it could be related to the time not being correct on your Windows 7 PC.
BatchFile Posted March 16, 2011 Author Posted March 16, 2011 Hmmm... I'll check, but I think it'll be ok as it's a machine I've pulled out of a computer room for testing so it's been running xp quite happily and setting it's clock every time someone logged in. I think I may have specified the domain incorrectly - I put cps rather than cps.local - I GUESS that could be it??? (just re-imaging now to try again and find out)
themightymrp Posted April 4, 2011 Posted April 4, 2011 Did putting the .local at the end cure your problem? I'm just about to start trying to sysprep some windows 7 machines and found this very useful thread
iMash Posted April 4, 2011 Posted April 4, 2011 Are you guys using WDS for deployment or some other imaging method? I have our Win 7 x64 images deploying perfectly from WDS and it allows me to specify the Computer Name at the time that you approve the PXE boot from within the WDS Admin Console.
ces973 Posted April 4, 2011 Posted April 4, 2011 Are you guys using WDS for deployment or some other imaging method? I have our Win 7 x64 images deploying perfectly from WDS and it allows me to specify the Computer Name at the time that you approve the PXE boot from within the WDS Admin Console. We're using WDS, but have it set up a little bit differently.
Richie1972 Posted April 5, 2011 Posted April 5, 2011 I build the image (both xp and win7 x64) via MDT 2010 and then use WinPE called via WDS (or on a second partition) to then download the image. Scripts handle joining domain and computer naming
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now