StefanScherer / packer-windows

Windows Templates for Packer: Windows 11, Windows 10, Windows Server 2022, 2019, 2016, also with Docker
MIT License
1.29k stars 434 forks source link

Re-configuring this for use of a retail key results in unable to parse unattended answer file #257

Closed basictheprogram closed 3 years ago

basictheprogram commented 4 years ago

Attempting to use the windows_10 configuration to build a retail version of Windows 10 Professional.

Changed iso_url, iso_checksum, iso_checksum-type

Changed answer_files/10/Autounattend.xml by commenting out the evaluate-windows-10-enterprise key and uncommenting the retail key (thanks for the documentation!)

<ProductKey>
    <Key>W269N-WFGWX-YVC9B-4J6C9-T83GX</Key>
    <WillShowUI>Never</WillShowUI>
</ProductKey>

Replaced the <Key></Key> with my key and started the build process.

Snippet from the build

==> vmware-iso: Creating floppy disk...
    vmware-iso: Copying files flatly from floppy_files
    vmware-iso: Copying file: ./answer_files/10/Autounattend.xml
    vmware-iso: Copying file: ./floppy/WindowsPowershell.lnk
    vmware-iso: Copying file: ./floppy/PinTo10.exe
    vmware-iso: Copying file: ./scripts/fixnetwork.ps1
    vmware-iso: Copying file: ./scripts/disable-screensaver.ps1
    vmware-iso: Copying file: ./scripts/disable-winrm.ps1
    vmware-iso: Copying file: ./scripts/enable-winrm.ps1
    vmware-iso: Copying file: ./scripts/microsoft-updates.bat
    vmware-iso: Copying file: ./scripts/win-updates.ps1
    vmware-iso: Done copying files from floppy_files
    vmware-iso: Collecting paths from floppy_dirs
    vmware-iso: Resulting paths from floppy_dirs : []
    vmware-iso: Done copying paths from floppy_dirs
==> vmware-iso: Creating required virtual machine disks
==> vmware-iso: Building and writing VMX file
==> vmware-iso: Starting virtual machine...
==> vmware-iso: Waiting 6m0s for boot...
==> vmware-iso: Connecting to VM via VNC (127.0.0.1:5924)
==> vmware-iso: Typing the boot command over VNC...
==> vmware-iso: Waiting for WinRM to become available...

Edit #1

After booting Windows puts up an dialog that is not auto-answered. Manually saying Next let the installation process resume

macos-packer

VMware Fusion reports

macos-packer

I do no think this project is about building retail copies of Windows?

But I'm posting this asking @StefanScherer if this project should build retail Windows and I've just got a local problem or the answer file is just a template that needs to be tweaked (more) to build retail Windows.

StefanScherer commented 4 years ago

What you could try is to comment out the whole ProductKey section. I remember I had problems with some ISOs in the past, but couldn‘t find an example.

basictheprogram commented 4 years ago

I take your comment as "yes" things should build with a retail key.

I'll try your suggestion tomorrow.