joefitzgerald / packer-windows

Windows Packer Templates
MIT License
1.63k stars 1.12k forks source link

Windows 10 Creators update installer has steps that aren't answered in the autounattend.xml file #239

Open amatas opened 7 years ago

amatas commented 7 years ago

If I use the Windows 10 Creators update eval iso image the build process stops at the first reboot because the region and the keyboard layout are not defined:

screenshot from 2017-05-09 15-48-37 screenshot from 2017-05-09 15-48-50 screenshot from 2017-05-09 15-48-57

eiximenis commented 7 years ago

Hi! Try add the following to your autounattend file:

        <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <InputLocale>en-US</InputLocale>
            <SystemLocale>en-US</SystemLocale>
            <UILanguage>en-US</UILanguage>
            <UILanguageFallback>en-US</UILanguageFallback>
            <UserLocale>en-US</UserLocale>
        </component>

Add it under <settings pass="oobeSystem">

amatas commented 7 years ago

Thanks, it worked.

I also had to add some registry keys in order to enable the autologin after the first reboot:

https://social.technet.microsoft.com/Forums/en-US/c59091a7-0fae-4dca-8baa-193c0906efe1/mdt-8443-w10ent-1703-auto-login-and-wsus-issue?forum=mdt

timsutton commented 7 years ago

Thanks for those hints, and I'm seeing the same autologin bug that others are talking about elsewhere. @amatas, would you mind showing an example of where you set this? I'm looking at AutoUnattend.xml but not exactly sure in what phase those reg keys could be set in order to take effect. I'm accustomed to doing a lot of my customization as part of the FirstLogonCommands so I obviously need to be earlier than that, but I assume it has to be while it's booted into the newly-imaged OS.

Thanks!

amatas commented 7 years ago

@timsutton these are the changes I made to fix this issue: https://github.com/amatas/packer-windows/commit/7fef2d9d2067b79f41ec9dc3c1449f3f1932189e

timsutton commented 7 years ago

Thank you! That seems to do it. Any idea whether it's possible to do this via a password hash instead of plaintext? (https://technet.microsoft.com/en-us/library/cc939702.aspx?f=255&MSPPError=-2147217396 seems to suggest no)

Do you know if there is somewhere where MSFT teams track issues like these publicly?

amatas commented 7 years ago

Any idea whether it's possible to do this via a password hash instead of plaintext?

It seems that MSFT allows you to hide sensible data of your unattend.xml files..... but it uses BASE64 hashes for "hiding" the strings :dancers: .

Do you know if there is somewhere where MSFT teams track issues like these publicly?

I don't know, sometimes is very frustrating to solve a Windows issue. The only related place I found was this, but it doesn't describe this issue. If you find an official place with that info, please share.

timsutton commented 7 years ago

Yeah, I've seen the base64 used elsewhere and use that when possible. I've also found at least one place where I seemed to require plaintext and the encoded version wasn't possible.

I assume it wouldn't be too hard to security generate and store a hash compatible with the format Windows uses to store a local admin user's, so I don't understand why using a proper hash for all these files stored on disk (often by users with domain admin rights) isn't something demanded by customers. But I digress :)

vitorneto commented 7 years ago

Hi there while on this issue about autounattended files, i have this one which goes through without any errors but when i go to login, using the passwords in the file i just cant! please help i am getting crazy with this...... i am new to this and i know i almost there.... i just need some sleep!!!

autounattend.zip

larytet commented 6 years ago

The patch solved the problem for me as well. Thanks.

@eiximenis , how did you figure out that the component name is "Microsoft-Windows-International-Core" etc? I will appreciate any tip related to the HowTo.

eiximenis commented 6 years ago

Hi @larytet I just used WSIM that shows you all component names and options and start trying... ;-)