Windows 10: CPI:offlineImage cpi:source question Solved

Page 1 of 2 12 LastLast

  1. Posts : 7
    Windows 7, Windows 10
       16 Nov 2015 #1

    CPI:offlineImage cpi:source question


    I have read quite a few of Kari's posts/articles regarding Windows 10 Unattend files and I am curious why exactly the answer file has to have an offline image 'source' in it. Does this tell setup where the WIM will be at some point, or strictly to link it to a WIM/Catalog to an answer file in Windows SIM?

    If that line is removed, will setup disregard the answer file? I'm curious mostly because the unattend is going to be IN an Sysprep'd image and not 'deployed' or inserted by another tool/service.
      My ComputerSystem Spec


  2. Posts : 12,391
    Windows 10 Pro
       16 Nov 2015 #2

    The CPI source is basically only needed when the answer file is edited in Windows System Image Manager. It should be either the install.wim file of the same Windows version, edition and bit architecture than the image we are working with, or a so called catalog file created from such install.wim file.

    It is safe to remove the <cpi> tags (cpi source location and Windows SKU) from an answer file. I have left it intentionally to all answer file samples in my sysprep related tutorials; for the first, it does no harm being there, and for the second in rare occasions it has helped to assist an OP to edit the answer file later on in SIM.

    An example. Here's a simple answer file to relocate the main profile folder Users to drive E:, containing the <cpi> tags:

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="oobeSystem">
    <component name="Microsoft-Windows-Shell-Setup" 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">
    <FolderLocations>
    <ProfilesDirectory>E:\Users</ProfilesDirectory>
    </FolderLocations>
    </component>
    </settings>
    <cpi:offlineImage cpi:source="wim:X:\sources\install.wim#Windows 10 PRO" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    The same answer file with the <cpi> tags removed does exactly the same thing:
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="oobeSystem">
    <component name="Microsoft-Windows-Shell-Setup" 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">
    <FolderLocations>
    <ProfilesDirectory>E:\Users</ProfilesDirectory>
    </FolderLocations>
    </component>
    </settings>
    </unattend>
    Kari
      My ComputerSystem Spec


  3. Posts : 7
    Windows 7, Windows 10
    Thread Starter
       16 Nov 2015 #3

    Now if only WSIM would stop validating, but then producing an error when I hit save.

    Trying to add a local account. When I add it to oobeSystem, put in the name and the password and hit validate -- no issues. When I hit SAVE -- I get a lovely "Unknown setting attribute xmlns:wcm" error.
      My ComputerSystem Spec


  4. Posts : 12,391
    Windows 10 Pro
       16 Nov 2015 #4

    Could you post the answer file code (removing all product keys, passwords and such), I'll have a look. Not promising anything but it might be I could find the culprit.
      My ComputerSystem Spec


  5. Posts : 7
    Windows 7, Windows 10
    Thread Starter
       17 Nov 2015 #5

    Yes, thank you very much, in advance!

    Code:
    <?xml version="1.0" encoding="utf-8"?><unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="auditSystem">
            <component name="Microsoft-Windows-PnpCustomizationsNonWinPE" 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">
                <DriverPaths>
                    <PathAndCredentials wcm:keyValue="1" wcm:action="add">
                        <Path>c:\windows\LDDriverStore</Path>
                    </PathAndCredentials>
                </DriverPaths>
            </component>
        </settings>
        <settings pass="auditUser">
            <component name="Microsoft-Windows-Deployment" 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">
                <RunSynchronous>
                    <RunSynchronousCommand wcm:action="add">
                        <Order>1</Order>
                        <Path>c:\windows\System32\sysprep\sysprep.exe /oobe /generalize /reboot </Path>
                    </RunSynchronousCommand>
                </RunSynchronous>
            </component>
        </settings>
        <settings pass="generalize">
            <component name="Microsoft-Windows-PnpSysprep" 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">
                <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
            </component>
        </settings>
        <settings pass="oobeSystem">
            <component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="AMD64">
                <OOBE>
                    <HideEULAPage>true</HideEULAPage>
                    <ProtectYourPC>1</ProtectYourPC>
                </OOBE>
                <RegisteredOwner>Blah</RegisteredOwner>
                <RegisteredOrganization>Blah</RegisteredOrganization>
                <TimeZone>Central Standard Time</TimeZone>
                <FirstLogonCommands>
                    <SynchronousCommand>
                        <Order>1</Order>
                        <CommandLine>cmd /q /c del /q /f c:\windows\panther\Unattend\unattend.xml</CommandLine>
                    </SynchronousCommand>
                </FirstLogonCommands>
                <UserAccounts>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
                            <Password>
                                <Value>blahblah</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <Name>Blah</Name>
                        </LocalAccount>
                    </LocalAccounts>
                </UserAccounts>
            </component>
        </settings>
        <settings pass="specialize">
            <component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="AMD64">
                <RegisteredOwner>blah</RegisteredOwner>
                <RegisteredOrganization>blah</RegisteredOrganization>
                <ComputerName>*</ComputerName>
                <CopyProfile>true</CopyProfile>
                <TimeZone>Central Standard Time</TimeZone>
            </component>
            <component name="Microsoft-Windows-UnattendedJoin" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="AMD64">
                <Identification>
                    <Credentials>
                        <Domain>blahblah</Domain>
                        <Username>blahblah</Username>
                        <Password>blahblah</Password>
                    </Credentials>
                    <JoinDomain>blahblah</JoinDomain>
                    <MachineObjectOU>blahblah/blah/blah/blah</MachineObjectOU>
                </Identification>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="wim:d:/imaging/windows_10_base/install.wim#Windows 10 Enterprise" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    The line is indicated in the error message is this one:
    Code:
    <LocalAccount wcm:action="add" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">

    Also, I noticed when combing through that I have the time zone twice. Hmm. Oobesystem should be the only place I really need that, right?


    Thanks again!
      My ComputerSystem Spec


  6. Posts : 7
    Windows 7, Windows 10
    Thread Starter
       17 Nov 2015 #6

    One thing I just stumbled upon by trial and error -- if I do the 'local account' addition in auditSystem (pass 5) instead of oobeSystem (pass 7), the error message goes away.

    It baffles me why even though settings apply to multiple passes, they only seem to work in very specific situations.


    At any rate, going to test this unattend right quick and see if it does what it SHOULD do!
      My ComputerSystem Spec


  7. Posts : 12,391
    Windows 10 Pro
       17 Nov 2015 #7

    lordkaladar said: View Post
    Yes, thank you very much, in advance!
    ...
    ...
    Also, I noticed when combing through that I have the time zone twice. Hmm. Oobesystem should be the only place I really need that, right?
    First, add the local and domain accounts rather in Pass 5 AuditSystem than Pass 7 OobeSystem, like this:

    Code:
    <settings pass="auditSystem">
            <component name="Microsoft-Windows-Shell-Setup" 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">
                <UserAccounts>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <Description>Main User</Description>
                            <DisplayName>Kari</DisplayName>
                            <Group>Administrators</Group>
                            <Name>Kari</Name>
                        </LocalAccount>
                    </LocalAccounts>
                </UserAccounts>
            </component>
        </settings>
    The same done in SIM. Add component to Pass 5:

    Click image for larger version. 

Name:	2015-11-17_16h26_22.png 
Views:	2 
Size:	158.4 KB 
ID:	48826
    (Click to enlarge.)

    Add the user:

    Click image for larger version. 

Name:	2015-11-17_16h29_14.png 
Views:	2 
Size:	113.8 KB 
ID:	48827

    About the timezone, add it to Pass 4 Specialize:

    Code:
    <settings pass="specialize">
            <component name="Microsoft-Windows-Shell-Setup" 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">
                <TimeZone>W. Europe Standard Time</TimeZone>
            </component>
        </settings>
    The same in SIM:

    Click image for larger version. 

Name:	2015-11-17_16h34_11.png 
Views:	2 
Size:	167.4 KB 
ID:	48828

    Should work!

    Kari
      My ComputerSystem Spec


  8. Posts : 7
    Windows 7, Windows 10
    Thread Starter
       17 Nov 2015 #8

    It is not making the account. I looked in the setup actions/errors files and there are none, but I'm still prompted to make one and the account name in the answer file is not present anywhere.

    Could having an "sysprep /oobe /generalize /reboot" in AuditUser have anything to do with that?
    (I've never understood why another sysprep is thrown into the process.)
      My ComputerSystem Spec


  9. Posts : 12,391
    Windows 10 Pro
       17 Nov 2015 #9

    lordkaladar said: View Post
    It is not making the account. I looked in the setup actions/errors files and there are none, but I'm still prompted to make one and the account name in the answer file is not present anywhere.
    Honestly, I have never had such an issue. The examples in my previous post is how you do it.

    lordkaladar said: View Post
    Could having an "sysprep /oobe /generalize /reboot" in AuditUser have anything to do with that?
    (I've never understood why another sysprep is thrown into the process.)
    I'm totally lost, having not a clue what you mean?

    How you do this:
    • Install Windows on your reference PC
    • When installation is done and OOBE shows the settings dialog, reboot to Audit Mode with CTRL + SHIFT + F3
    • Create your answer file
    • Sysprep with this command:
      Code:
      %windir%\sysprep\sysprep.exe /generalize /oobe /reboot /unattend:X:\AnswerFile.xml
      • The /unattend:AnswerFile_Path switch is not needed if the answer file is saved as unattend.xml in C:\Windows\System32\Sysprep folder
      • If the answer file is saved in any other location or with any other name, the switch /unattend:X:\AnswerFile.xml is needed, telling the path and location of the answer file (in this example AnswerFile.xml on root of the drive X:)
      • The /generalize switch is only needed if the default user profile will be customized or if the image needs to be hardware independent
      • If /generalize switch is used, it should be the first switch after the sysprep command itself

    That's it. User accounts will be created as told in the answer file.
    Last edited by Kari; 17 Nov 2015 at 13:11. Reason: An incredible amount of typos!
      My ComputerSystem Spec


  10. Posts : 7
    Windows 7, Windows 10
    Thread Starter
       17 Nov 2015 #10

    I'm going to move the answer file from where it was in our older Windows 7 image into Sys32\Sysprep and see if it behaves.

    I'm basing some of this from the work of a previous admin, sorry. We were using a deployment tool before and performing tons of actions automatically, including the sysprep actions (calling it, capturing the image, etc) but I'm trying to get more hands-on with it as I was not privy to much of the previous image development cycle.

    I appreciate all your help very much! Thank you!

    I'm running the process again.
      My ComputerSystem Spec


 
Page 1 of 2 12 LastLast

Related Threads
Source to use for DISM on Windows 10 in Performance & Maintenance
I have a Lenovo W530 laptop, that started with Windows 7 Pro, then got upgraded to Windows 8, then 8.1, and now 10 Pro. I have the factory setup disks for only 7 and 8. I ran DISM and it says the source files could not be found. From a similar...
wake source missing in General Support
Hi! First post here. I was planning on doing a script that behaves differently depending on which wake source type waking up my system from hibernate. Im abled to differentiate between timer wake-up and mouse/keyboard wake-up, but not between...
Source of ICON's in Performance & Maintenance
The upgrade went smoothly, for the most part. Now comes the tweeking !! I lost the IE Icons (I knew I would) and need to replace them. The Windows Icon file dates back to the dawn of time. Where can I download some new Icons to use for my...

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 20:06.
Find Us