Autounattend with no product key?

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 4,187
    Windows 11 Pro, 22H2
       #11

    Fantastic! Glad it's looking good.

    A couple of notes:

    1) It looks like Windows SIM may be an older version. The currently released version, which is for Win 10 2004 through 21H1 shows a version of 10.0.19041.1. You can download that version here:

    https://docs.microsoft.com/en-us/win...ed/adk-install

    Note that they officially call this one ADK Version 2004.

    2) The suggestion that you received to not use a product key in your answer file was probably (I'm guessing at this) meant to say not to use an <activation key>. Note that this is very different from the generic installation key that does not allow for activation of Windows. It is the generic key that you would typically use.

    In any case, I'm glad it's working for you now. I certainly learned something here. I had no idea that you could omit that key like this. I did know about the metadata, but this is handy thing to keep in the bag of tricks.
      My Computers


  2. Posts : 7
    Windows 10
    Thread Starter
       #12

    For anyone who might be interested, I've found also that using an answer file that has no product key specified lets Windows automatically use the embedded UEFI product key that comes with many laptops these days. Just make sure to specify the right version of Windows during the WindowsPE pass
      My Computer


  3. Posts : 2
    Windows 11
       #13

    @QuantumX - Grat news that you finally got there! I've tried 8 times now to get this functionality... I've got everything working except being able to bypass the product key at the point of installation. Would you share your autounattend.xml file? It'd be super awesome to look through it...
      My Computer


  4. Posts : 4,187
    Windows 11 Pro, 22H2
       #14

    QuantumX said:
    For anyone who might be interested, I've found also that using an answer file that has no product key specified lets Windows automatically use the embedded UEFI product key that comes with many laptops these days. Just make sure to specify the right version of Windows during the WindowsPE pass
    @QuantumX, I only just now saw your post after the response from @thestraycat, so this is a little late.

    I'm going to be blunt and say that I'm not believing your post . I hope that you can prove me wrong because I'd love to learn a new trick, but here are the problems with your post:

    1) Bear in mind the purpose of the GENERIC key in the answer file is to tell Windows setup what edition of Windows to install. I highlight the fact that this is a generic key to make this point: Even if were installing the same edition of Windows on 1,000 systems, you would use the same license key in the answer file for ALL of those systems. Again, the entire purpose of this key is to tell setup what edition of Windows to install.

    2) You state that you need to specify the correct version (I know that you really mean "edition") of Windows in the WinPE pass. Why would this be any better than specifying the edition to install with the generic key? Either way, you still need to tell setup what edition to install.

    3) Why would there be two different settings to specify the edition of Windows to be installed (The setting you mention needing to put in the Win PE pass and the generic key)?

    Again, I'd love to learn a new trick and be proven wrong, so if you could tell us what setting you used in the Win PE pass I would really appreciate it.
      My Computers


  5. Posts : 7
    Windows 10
    Thread Starter
       #15

    @thestraycat @hsehestedt

    Other than the Product Key, Microsoft allows three ways to specify the edition in the answer file: /IMAGE/INDEX, /IMAGE/NAME and /IMAGE/DESCRIPTION. https://docs.microsoft.com/en-us/win...lfrom-metadata

    These values van be obtained from your WIM file with this command on the path of your install.wim:
    Code:
    DISM /Get-WimInfo /WimFile:D:\sources\install.wim
    I ended up using this method instead of the product key since I needed a "blank" license key so that it can automatically be populated by the key from the system's firmware. The drawback is that the values changes according to which edition you install so if you want to install Home you will need a new answer file with the relevant /IMAGE value, but 95% of the times I install Pro so it does not bother me.

    This is the result, Windows Activation saying no license installed but slmgr.vbs correctly detecting the generic retail key without it being entered in the answer file:


    Here is the relevant part of the WindowsPE pass of the answer file:
    Code:
    <ImageInstall>
        <OSImage>
            <WillShowUI>OnError</WillShowUI>
            <InstallTo>
                <DiskID>0</DiskID>
                <PartitionID>4</PartitionID>
            </InstallTo>
            <InstallFrom>
                <MetaData wcm:action="add">
                    <Key>/Image/Index</Key>
                    <Value>6</Value>
                </MetaData>
            </InstallFrom>
        </OSImage>
    </ImageInstall>
    <UserData>
        <ProductKey>
            <Key></Key>
        </ProductKey>
        <AcceptEula>true</AcceptEula>
    </UserData>
    Let me know if there is anything else I should clarify. I've done at least 100 installs with this answer file and it's always worked correctly.
      My Computer


  6. Posts : 4,187
    Windows 11 Pro, 22H2
       #16

    This is interesting, but a little different from how I've done it in the past.

    It's possible that my understanding is incorrect, but from what I have read in the Microsoft docs, and the way that I understood it, even whn using the metadata, a generic key should still be used.

    Let me provide an example with more explanation:

    I often start with a retail Windows ISO image which includes all the editions such as Home, Pro, Education, etc. So, let's say that I want to install the Pro edition. In that case, I would simply put the generic Win 10 Pro key in my answer file and call it a day.

    However, I often modify my ISO image by adding one more Windows 10 Pro Sysprep images. Now, the license key by itself is insufficient because there is more than one Windows 10 Pro edition within the same image. As a result, I add the metadata to tell setup PRECISELY which one needs to be installed.

    What I wasn't aware of was that the metadata could be used in lieu of the generic key. It had always been my understanding that the metadata was needed in ADDITION to the generic key. Clearly this is not the case since this works for you.

    But could you clarify one point for me? You had noted that you were doing this because you needed a blank key so that the key from the firmware could be populated. Am I correctly understanding that this means that Windows would not automatically activate using the OEM key if you had the generic key in place but that it will successfully activate if you use the metadata without the generic key?
      My Computers


  7. Posts : 7
    Windows 10
    Thread Starter
       #17

    hsehestedt said:
    But could you clarify one point for me? You had noted that you were doing this because you needed a blank key so that the key from the firmware could be populated. Am I correctly understanding that this means that Windows would not automatically activate using the OEM key if you had the generic key in place but that it will successfully activate if you use the metadata without the generic key?
    Yes, in my experience this is what happens. If you have the generic key in place you have to first replace it with the OEM key.

    This is tedious since you need to get the OEM key first by either finding it in the system's UEFI firmware and writing it down, or by extracting it with Powershell, and then manually entering it into the activation window.

    If you install without specifying the product key Windows automatically retrieves it from the system's UEFI firmware and activates it also, given that you are online.

    Unattend files are normally used in a corporate environment with generic KMS keys and an activation server, but I've found this method works well for Retail/OEM versions and online activation.
      My Computer


  8. Posts : 4,187
    Windows 11 Pro, 22H2
       #18

    Very interesting conversation. You may have just revealed a weak point of my testing. You see, I get fully ligit Pro license keys dirt cheap because of ongoing previous job benefits. So, when I purchase a laptop with Home edition, I pretty much within minutes of booting the machine, upgrade to Pro. So, all my testing is on a machine with a DIGITAL ENTITLEMENT.

    On my desktops, they are self built, so no OEM key is involved. Again, I'm dealing with a digital entitlement.

    So I may have to test this in the morning by installing Home edition (yuck) on my notebook and see if behaves differently using your method vs what I have been doing.
      My Computers


  9. Posts : 2
    Windows 11
       #19

    @QuantumX - Thanks for posting the code snippet. If you could post the whole autounattend.xml with any confidential info removed obviously (although i dont think ANY of it is as you've removed the key? But if need be just make a note to what was removed if need be?) that would be super useful.

    The reason is, i use an auto answer file generator (Windows Answer File Generator) which works great, however the XML that is generated dosn't 100% match up with the XML created by whatever toolset you are using to create yours... I've tried 8 different variations now of similar code excerts like yours by editting my XML file and trying to best-fit the excert into it... the issue being every test attempt takes 30 minutes to fail at the 'specialize' stage and bomb out. lol.

    On a side note, are the 3 methods you mentioned (/IMAGE/INDEX, /IMAGE/NAME and /IMAGE/DESCRIPTION) simply variables that you dont actually write literally into the XML file like this: /IMAGE/NAME but instead write something like this: /IMAGE/Windows11Pro (or similar?) It would be great to see an example of how this is written in the autounattend.XML file.

    Anything you can share or link to would be amazing and a real time saver.
      My Computer


  10. Posts : 4,187
    Windows 11 Pro, 22H2
       #20

    @QuantumX - I have an HP laptop that originally came with Windows 10 Home. As I noted before, I pretty much instantly upgraded it to Pro. But, in light of the information that you provided, I thought that I would just try installation of Win 10 from scratch now. So I performed the installation twice.

    The first time I did it your way (no license key specified and the metadata present in the answer file). This installed flawlessly, activating when I gave the system access to the Internet.

    On my second installation I flipped the scenario. I had the generic key in the answer file but no metadata entries. That worked the same way with Windows successfully activating after Internet access was provided.

    Bottom line is that both methods work equally well for me. But at least now I have learned that if I use the metadata entries I can omit the generic key if I so choose.

    @thestraycat - I know that you were looking for an answer specifically from QuantumX so I hope you don't mind my just jumping in here.

    My first comment is this - I'm not personally a big fan of those answer file generators. If you look here on the Forums you will see that people have problems with those over and over and over again. I think it's really worth it to just take the few minutes to create your own, especially since there are such wonderful tutorials here to guide you through this. If you need any pointers to doing this, I'd be happy to help.

    I have a question for you: In an earlier post you made the following statement to QuantumX - "I've got everything working except being able to bypass the product key at the point of installation.". May I ask why it is that you want to bypass the key? I just want to clarify one point here to make sure that you understand this point. The license key specified in the answer file HAS ABSOLUTELY NOTHING to do with Windows activation. It is a "generic" key, meaning that literally MILLIONS of installations have been performed using the same key. The only purpose of the key is to tell setup what edition (Home, Pro, Etc.) to install.

    Finally, you were asking about the metadata settings. If you look at the partial answer file that was posted by QuantumX you will note that these are actual text placed in the answer file.

    Here are some basic usage instructions:

    Load your autounattend.xml answer file in the Windows System Image Manager. In the Windows Image pane, expand the following tree:

    Setup > ImageInstall > OSImage > InstallFrom

    Right click on MetaData and select Add Setting to Pass1 windowsPE

    In the Answer File pane, click on InstallFrom in the tree and set the following value:

    Path \install.wim

    In the Answer File pane, click on MetaData in the tree and set these values:

    Key /IMAGE/INDEX
    Value <the index number of the Edition you want to install>

    NOTE: Each Windows edition will have a unique index number: 1, 2, 3, 4, etc.

    To determine the index number for the value above, run this command (assuming the image is mounted as E:):

    dism /Get-WimInfo /WimFile:E:\Sources\install.wim

    Example:

    If you want to install the edition with an index of 6, set these values:

    Key /IMAGE/INDEX
    Value 6

    Note that you can also choose the edition of Windows by specifying the NAME or DESCRIPTION of the Windows edition like this rather than the index number:

    /IMAGE/NAME
    or
    /IMAGE/DESCRIPTION

    The same command shown above that lists the index also shows the NAME and DESCRIPTION for each Windows edition.

    <END USAGE INSTRUCTIONS>

    If you need any further assistance, please do let me know. If you want sample answer files I can provide those as well.

    BTW, could you tell me something to help me better understand how you are using this? Are you creating a sysprep image and deploying it or are you simply using an answer file to deploy a standard (unmodified) Windows image?
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 02:37.
Find Us




Windows 10 Forums