Article Index

Section 3 : Create a script to remove the unattend.xml file after deployment

  1. On the deployment base image computer open Notepad and enter in the following lines:

del /Q /F c:\windows\system32\sysprep\unattend.xml
del /Q /F c:\windows\panther\unattend.xml

  1. These lines of code will delete the unattend.xml file from the computer once the Windows Setup is finished with them (this file is copied into the panther directory during setup hence the two lines)
  2. Save this file to the desktop called SetupComplete.cmd
  3. Now create a folder called Scripts in this directory: C:\Windows\Setup\ and drag this file into it (you may be prompted for Administrator authority). 

Hint:  Windows will automatically check for the existence of this file and run it after Windows Setup has completed, feel free to add anything else into this file that you think may be useful in your deployment.


Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
More information Ok