Share via

Issues with generating PPKG using customizations.xml file

Anonymous
2023-09-23T08:01:10+00:00

What I'm trying to do:
I'm trying to generate a PPKG file using settings from the customizations.xml configuration file. For generating the PPKG file, I use the CLI command named ICD, here's the documentation for it: https://learn.microsoft.com/en-us/windows/configuration/provisioning-packages/provisioning-command-lineThe problem is that ICD doesn't recognize the structure of my customizations.xml file:

<?xml version="1.0" encoding="utf-8"?>
<WindowsCustomizations>
    <PackageConfig xmlns="urn:schemas-Microsoft-com:Windows-ICD-Package-Config.v1.0">
        <ID>{2422e56e-3ed9-47f8-bb4c-d96a949dff4f}</ID>
        <Name>My MDM package</Name>
        <Version>1.2</Version>
        <OwnerType>OEM</OwnerType>
        <Rank>0</Rank>
        <Notes></Notes>
    </PackageConfig>

    <Settings xmlns="urn:schemas-microsoft-com:windows-provisioning">
        <Customizations>
            <Common>
                <Policies>
                    <Start>
                        <HideLock>0</HideLock>
                    </Start>
                    <Bluetooth>
                        <LocalDeviceName>MDM Device 001</LocalDeviceName>
                    </Bluetooth>
                </Policies>
            </Common>
        </Customizations>
    </Settings>
</WindowsCustomizations>

When trying to generate the PPKG, I get the following error:

PS C:\Users\void\Documents\ppkg-test-data> ICD /Build-ProvisioningPackage /CustomizationXML:customizations.xml /PackagePath:ppkg/test.ppkg

Microsoft (C) Windows Imaging and Configuration Designer

ICD.exe : ERROR: The following errors were detected in customizations:
ICD.exe : ERROR: Settings were not found in the store file.
ICD.exe : ERROR: Parse error (0x80070490): 'Start' is not a valid child node for /
ICD.exe : ERROR: C:\Users\void\OneDrive\Documents\Windows Imaging and Configuration Designer (WICD)\Common\ICDCommon_20230923-063317-891_20744.log

I thought maybe I was just not following the documentation correctly and my structure was wrong, so I decided to use the GUI application, Windows Configuration Designer, to create the PPKG. After the PPKG was successfully created through the GUI, I went to the source to check the customizations.xml file structure, and it was absolutely the same!!!
Then I tried to call the above command, but using the file that was generated by the program, and I got the same error.So, the question is, what am I doing wrong? Maybe the WCD application under the hood uses a different CLI utility? How come it successfully generates PPKGs through it, but I can't do it through the CLI? Please help.

Windows for home | Windows 11 | Accounts, profiles, and login

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2023-12-29T13:52:50+00:00

    I've been working a lot with WCD recently, and have been experiencing issues whereby the Bulk Token is expiring. Which led me down the path of finding ways to recreate the bulk token for an existing provisioning package. As a result, I stumbled across Michael's blog post at Simplify the process of generating an AAD bulk enrollment provisioning package – Out of Office Hours (oofhours.com)

    Which then sent me down another rabbit hole, of wondering if I could simply create my desired PPKG automagically, using this code.

    Seeing that Michaels script simply builds the XML on the fly, I thought I could be clever and simply throw in the XML code from customisations.xml which was generated by the WCD GUI.

    In doing so, this returned errors similar to the above.

    Reviewing the generated log file referenced in the error, hinted at the Store File being the issue.

    12/29/2023 1:17:59 PM Info StoreFile path: C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Imaging and Configuration Designer\x86\Microsoft-Common-Provisioning.dat 12/29/2023 1:17:59 PM Info Loaded Knobs schema hive at C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Imaging and Configuration Designer\x86\Microsoft-Common-Provisioning.dat 12/29/2023 1:17:59 PM Error WpxGetFileEdition (onecore\base\ntsetup\wpx\core\store.cpp:103) - 0x80070002: 12/29/2023 1:17:59 PM Error     No SKU information file C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Imaging and Configuration Designer\x86\Microsoft-Common-Provisioning.sku.xml available for store file C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Imaging and Configuration Designer\x86\Microsoft-Common-Provisioning.dat 12/29/2023 1:17:59 PM Info Loaded settings from Windows Unknown Unknown 12/29/2023 1:17:59 PM Error WpxConfig::FindSchema (onecore\base\ntsetup\wpx\core\config.cpp:162) - 0x80070490: 12/29/2023 1:17:59 PM Error     Couldn't find schema path for DevDetail under / 12/29/2023 1:17:59 PM Error WpxSetting::GetChild (onecore\base\ntsetup\wpx\core\setting.cpp:249) - 0x80070490: 12/29/2023 1:17:59 PM Error     Couldn't find schema for answer path /DevDetail 12/29/2023 1:17:59 PM Error WpxWpafReader::ReadSettingsTree (onecore\base\ntsetup\wpx\file\wpafreader.cpp:628) - 0x8007000d: 12/29/2023 1:17:59 PM Error     Unrecognized child DevDetail specified for tree setting / 12/29/2023 1:17:59 PM Error WpxWpafReader::ReadCommonSettings (onecore\base\ntsetup\wpx\file\wpafreader.cpp:197) - 0x8007000d: 12/29/2023 1:17:59 PM Error     Couldn't read common settings 12/29/2023 1:17:59 PM Error WpxWpafReader::Read (onecore\base\ntsetup\wpx\file\wpafreader.cpp:78) - 0x8007000d: 12/29/2023 1:17:59 PM Error     Failed to read common settings node 12/29/2023 1:17:59 PM Error WpxConfig::ReadAnswerFile (onecore\base\ntsetup\wpx\core\config.cpp:598) - 0x8007000d: 12/29/2023 1:17:59 PM Error     Failed to load answer file 12/29/2023 1:17:59 PM Error The following errors were detected in customizations: Settings were not found in the store file. Parse error (0x80070490): 'DevDetail' is not a valid child node for / 12/29/2023 1:17:59 PM Error Microsoft.Windows.ICD.Common.Exceptions.CustomizationsException: The following errors were detected in customizations: Settings were not found in the store file. Parse error (0x80070490): 'DevDetail' is not a valid child node for /    at Microsoft.Windows.ICD.Provisioning.ImageCustomization.ImageCustomizations.ReadAndValidateWPXAnswerFile(Config wpxConfig, XDocument wpxDocument, Boolean ignoreWpxParseErrors)    at Microsoft.Windows.ICD.Provisioning.ImageCustomization.ImageCustomizations.Load(XDocument customizationsXDoc, Boolean onlySettings, Boolean ignoreWpxParseErrors)    at Microsoft.Windows.ICD.Provisioning.ImageCustomization.ImageCustomizations.CreateAndLoadAnswers(XDocument customizationsXDoc, IStoreConfig storeConfig, Boolean ignoreWpxParseErrors, Boolean isMobile)    at Microsoft.Windows.ICD.Core.Common.Project.LoadCustomizations(XDocument customizationsXDoc)    at Microsoft.Windows.ICD.Core.Common.Project.CreateFromStoreFile(IEnumerable`1 storeFilePaths, String location, XDocument customizationsXDoc, InvocationMode invocationMode)    at Microsoft.Windows.ICD.Core.CLI.BuildPackageCmdHandler.Execute()

    Being familiar with Windows Configuration Designer and Answer Files and what not, I am familiar with the different layers and levels of customisations. As such, I explored the Store File referenced, and found there is a variety of Provisioning DAT files. (HoloLens, Desktop, Team, Mobile etc)... as an attempt at a quick fix, I simply renamed Microsoft-Desktop-Provisioning.dat to Microsoft-Common-Provisioning.dat, backing up the old file in the process, and attempted to generate the PPKG again using Michaels script.

    This time it was a success. Suggesting that the COMMON.dat being called by default isn't all encompassing.

    Further reading of the ICD help articles on the Microsoft site revealed that you can indeed call the specific Store file, so appending /StoreFile:"$kitsRoot\Assessment and Deployment Kit\Imaging and Configuration Designer\x86\Microsoft-Desktop-Provisioning.dat" should work, but it seems like there's a bug in ICD preventing more than two params being called.

    As such, I created a hacky song and dance in the script that renames the existing Microsoft-Common-Provisioning file, creates a copy of the Desktop file in its place, creates the package, and then returns things to normal.

    See Improve the process of generating an AAD bulk enrollment provisioning package – James Vincent

    Was this answer helpful?

    0 comments No comments
  2. DaveM121 891.6K Reputation points Independent Advisor
    2023-09-23T08:33:33+00:00

    Hi, I am Dave, I will help you with this.

    I am Dave, I will help you with this.

    I apologize, Community is just a consumer forum, due to the scope of your question can you please post this question to our sister forum on Microsoft Q&A (The System Administrators and IT Pro Forum)

    Over there you will have access to a host of System Administrators and IT Pro experts and will get a knowledgeable and quick answer to this question.

    https://docs.microsoft.com/en-us/answers/index....

    Was this answer helpful?

    0 comments No comments