joefitzgerald / packer-windows

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

Add comments about <key> to Windows 8.1 Autounattend.xml #114

Closed jreadytalk closed 10 years ago

jreadytalk commented 10 years ago

It would be good to add comments about <key> to the Autounattend.xml for Windows 8.1. Comments like those found in other Autounattend.xml files:

<!-- You must uncomment the Key element (and optionally insert your own key) if you are using retail or volume license ISOs -->
<!--<Key>D2N9P-3P6X9-2R39C-7RTCD-MDVJX</Key>-->

I couldn't get my retail license working without it. If Windows 8's evaluation distribution needs an (un-<key>-wrapped) value there, then we'll have to tweak the comment a bit to say "just wrap your key string in <key>".

kensykora commented 10 years ago

There is already documentation about the Key values in the readme, is what's listed there enough or is there something I'm not understanding with your request that needs further clarification in the Readme.md?

https://github.com/joefitzgerald/packer-windows#product-keys

jreadytalk commented 10 years ago

Oops, posted last comment (deleted) under wrong account. :P Well, that was my reasoning. You already put similar comments in other Autounattend.xml files and that's good because it's best to keep code comments in the code they apply to. Otherwise users have to memorize parts of the readme and recognize when they're looking at the applicable code. Makes a steeper learning curve.

kensykora commented 10 years ago

Ahh, I see. It seems that the 8.1 file is inconsistent with the other ones in that the others have a <Key> element but this one does not. I'll update it to be consistent.

kensykora commented 10 years ago

Can you post a sample of the XML you use in yours (scrub the key out, etc) so I can include it in the documentation? Or is it basically the same as the other files (win7, windows server, etc)?

jreadytalk commented 10 years ago

It depends if I can safely leave the ProductKey empty for the Windows 8 trial ISO (as is the case with 2012r2 according to it's XML comments). I haven't tried.

If so, then the XML comment should be the same as the others. Here's the code with the default Windows 8 key filled in:

<!-- Product Key from http://technet.microsoft.com/en-us/library/ff793406.aspx -->
<ProductKey>
    <!-- Do not uncomment the Key element if you are using trial ISOs -->
    <!-- You must uncomment the Key element (and optionally insert your own key) if you are using retail or volume license ISOs -->
    <!--<Key>XC9B7-NBPP2-83J2H-RHMBY-92BT4</Key>-->
    <WillShowUI>OnError</WillShowUI>
</ProductKey>

If not, then we'd have to change the comments a little:

<!-- Product Key from http://technet.microsoft.com/en-us/library/ff793406.aspx -->
<ProductKey>
    <!-- If you are using retail or volume license ISOs, you must wrap your key in a <Key> element. -->
    <!-- Example: <key>XC9B7-NBPP2-83J2H-RHMBY-92BT4</key> -->
    XC9B7-NBPP2-83J2H-RHMBY-92BT4
    <WillShowUI>Never</WillShowUI>
</ProductKey>
kensykora commented 10 years ago

Thanks!

jreadytalk commented 10 years ago

thumbs-up

jalessio commented 9 years ago

I stumbled across this issue after submitting a pull request for the same thing. See https://github.com/joefitzgerald/packer-windows/pull/133/ for what I think is basically an in-line documentation/consistency improvement.