none
Unattend.xml gets deleted RRS feed

  • Question

  • Hi

    We're creating a Win10 image using MDT 2013 (install OS, apps, sysprep, shutdown, create wim).

    I noticed that after applying the image to a target I was getting OOBE.  And I couldn't find the unattend.xml anywhere within C:\Windows.  I did check the unattend.xml in the relevant Control folder on the MDT server, and sure enough there's an OOBE section.

    So I added a step to the MDT TS to copy an unattend.xml to C:\Windows\Panther\Unattend.

    I observed the file was copied successfully during the task sequence.  However, after the WIM was created I mounted it, and the file was no longer there.  Does C:\Windows\Panther\Unattend\Unattend.xml get removed during MDT's sysprep phase?

    When we use SCCM for OSD we have an unattend that's applied via the MDT toolkit.  However, for this particular image I'm working on I cannot use SCCM.  So do I need to inject the unattend after the WIM has been created?

    Sunday, January 14, 2018 5:44 PM

Answers

  • I'm interested when you say "MDT does not auomatically place the unattend.xml file on the c:\ drive after sysprep, so if you want to do this, it's your responsibility".

    If I add an action in the TS (prior to the sysprep/imaging steps) to copy over an unattend.xml (containing the same OOBE-pass settings as the unattend associated with the TS) to c:\windows\panther\unattend this file is also not found if I subsequently mount the captured image

    Yup, is sounds like sysprep is removing any file present on the local machine. 

    Have you tried copying the file *AFTER* sysprep (also, you can't copy the file over the network after sysprep, network is disabled).


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    • Marked as answer by ep1971 Friday, January 19, 2018 11:46 AM
    Wednesday, January 17, 2018 4:56 PM
    Moderator

All replies

  • First, you should be using the latest version of MDT to create WIndows 10 images. 

    Additionally, there may be some complications with c:\windows\panther\unattend

    https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/windows-setup-automation-overview

    Suggests that when starting with WinPE %windir%\panther\unattend will not be processed.

    Check the panther logs to verify.


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    Monday, January 15, 2018 4:52 AM
    Moderator
  • Hi

    I'm using MDT 8443 which I believe is fine for Win10 1607 LTSB.

    I'm familiar with the page you linked to - indeed it was the info on this page that led me to inject the XML into C:\Windows\Panther\Unattend post-WIM creation.

    Let me put this another way:

    • MDT task sequence creates reference image
    • (Task sequence's unattend.xml has a valid OOBE section which sets locale, autologon etc )
    • Reference image WIM is applied to a target machine
    • Instead of autologon etc, OOBE runs and asks for locale etc with no evidence that the unattend.xml is being processed at all .. if it's even there.

    However, if I do the following:

    • Mount WIM
    • Create folder C:\Windows\Panther\Unattend (because it doesn't exist)
    • Copy unattend.xml to the folder
    • Commit WIM
    • Apply WIM to target machine
    • Windows starts up and processes OOBE section correctly

    What I don't understand is why is it ignoring the OOBE section in the task sequence's XML?  I shouldn't have to copy one to the image post-WIM. 

    Monday, January 15, 2018 7:59 AM
  • IT's not clear to me if the problem above is within the sysprep and capture process or afterwards while trying to deploy the image created by the capture process. 

    It's also not clear to me if your sysprep and capture process created the correct unattend.xml file, above you mention having to:


    • Create folder C:\Windows\Panther\Unattend (because it doesn't exist)
    • Copy unattend.xml to the folder

    MDT does not auomatically place the unattend.xml file on the c:\ drive after sysprep, so if you want to do this, it's your responsibility. 

    if you are still having problems please upload your bdd.log, smsts.log and sysprep logs to a public site like onedrive and share the link. 


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    Wednesday, January 17, 2018 4:10 AM
    Moderator
  • Hi Keith, thanks for the reply, much appreciated.

    I think I'd have problems posting the files.  I'd have to remove so much sensitive info that I suspect the files wouldn't be of much help for troubleshooting.  I could recreate this scenario in my lab and post the files .. that'll take a few days.

    I'm interested when you say "MDT does not auomatically place the unattend.xml file on the c:\ drive after sysprep, so if you want to do this, it's your responsibility".

    So are you saying that a reference image created using MDT will never get to run the OOBE pass, because during the sysprep MDT gets rid of the unattend.xml that is associated with the task sequence?

    • For sure, if I mount a newly captured image I find no unattend.xml anywhere in the Windows directory tree
    • If I add an action in the TS (prior to the sysprep/imaging steps) to copy over an unattend.xml (containing the same OOBE-pass settings as the unattend associated with the TS) to c:\windows\panther\unattend this file is also not found if I subsequently mount the captured image
    • If I add the unattend.xml post-capture (to C:\windows\panther\unattend - and I have to create this folder because it's not present in the capture) then the OOBE is processed as expected
    Thanks again for your assistance.


    • Edited by ep1971 Wednesday, January 17, 2018 9:20 AM
    Wednesday, January 17, 2018 9:18 AM
  • I'm interested when you say "MDT does not auomatically place the unattend.xml file on the c:\ drive after sysprep, so if you want to do this, it's your responsibility".

    If I add an action in the TS (prior to the sysprep/imaging steps) to copy over an unattend.xml (containing the same OOBE-pass settings as the unattend associated with the TS) to c:\windows\panther\unattend this file is also not found if I subsequently mount the captured image

    Yup, is sounds like sysprep is removing any file present on the local machine. 

    Have you tried copying the file *AFTER* sysprep (also, you can't copy the file over the network after sysprep, network is disabled).


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    • Marked as answer by ep1971 Friday, January 19, 2018 11:46 AM
    Wednesday, January 17, 2018 4:56 PM
    Moderator
  • Ok, so I added the xml to the task sequence immediately after the sysprep action.  I confirmed that the file was present whilst the image was being created (F8 .. CMD prompt .. check for file .. yup it was there).

    Then I mounted the WIM and ... the file was nowhere to be seen!

    Just at that moment some colleagues were talking about antivirus exclusions, so that got me thinking.  So I looked in the BDD.LOG and sure enough, the DISM command to capture the image uses a wimscript.ini which contains an exclusion list.  One of the exclusions is the Windows\Panther folder.

    I wonder if it's safe to remove that path from the wimscript.ini, or maybe add an exclusion exception.

    Anyway, that explains why the xml gets deleted.

    Thanks very much for your help.  Much appreciated.

    Friday, January 19, 2018 11:46 AM