3 Replies Latest reply on Aug 13, 2010 8:16 AM by AspenSkier

    Delete unattend.xml file


      What is the best way to delete the unattend.xml file? I added 'del' commands to the setupcomplete.cmd file but the then my LD agent action failed as it appended the '%systemdrive%\ldprovisioning\ldprovisioning.cmd' to the end of the 'del' command. Is there a way to add commands to the ldprovisioning.cmd file to delete the unattend.xml files?


      Additionally, if not the ldprovisioning.cmd file, what would be the best way to accomplish deleting the unattend.xml file once image deployment completes?

        • 1. Re: Delete unattend.xml file

          While this doesn't get rid of it the way you specified, it does work.


          We are deleting UNATTEND.XML towards the end of our provisioning template.

          the file gets placed in C:\

          One of the last steps in our provisioning templates includes a DELETE FILE action and we nuke C:\UNATTEND.XML



          -it works; but you have to remember to include it in your templates.  It might be better to have someplace else, but I don't know.   I'm interested to see what others have to say about your question.

          • 2. Re: Delete unattend.xml file

            The unattend.xml is in c:\windows\system32\sysprep and it also gets cached to the c:\windows\panther folder. I tired the delete action and it didnt' work; file ownership. Seems the system account cannot delete these files in c:\windows.


            Since i have the win7 product key in the unattend.xml, that is my only reason to delete the file. I'll test adding the key as a 'public variable' in the templates section and see if it works.

            • 3. Re: Delete unattend.xml file

              Just a heads up, changing a hard-coded Win7ProductKey to a public variable is not going to hid it from snooping eyes once your image is down.


              If the Unattend.XML file remains on your machine after your provisioning task is complete, a user can open it and pull out your product key.  Landesk will use the REPLACE TEXT action to affect the change, but when it does this you will end up with your actual product key listed in plain text.


              If you want security for your key, you need to find a way to delete the sysprep file.


              Any chance that you can relocate your product key someplace else where you won't have the permissions problems?