New
#500
Also, you do not need to put the answer.xml on another drive like D or whatever.
1) Go into %WINDIR%\Setup and create a folder called "Scripts."
2) Right-click > New > Text Document within %WINDIR%\Setup\Scripts and name the new document SetupComplete.txt (it must have this name).
3) Change the extension of the document from .txt to .cmd which will make it a single execution "script" after it's been used (so you will now have a SetupComplete.cmd file in your %WINDIR%\Setup\Scripts folder).
4) Open SetupComplete.cmd with Notepad and inset the following script: del /Q /F c:\windows\system32\sysprep\unattend.xml
5) The unattend.xml (change the name to whatever you name your answer file) is also automatically copied over to C:\Windows\Panther directory, so add a second line to your script in the same context, just for a different directory: del /Q /F c:\windows\panther\unattend.xml
Now, once the unattend.xml has been utilized, and the deployment successful, the SetupComplete.cmd script runs and deletes the unattend.xml files. This allows you to keep them on the deployment distribution and not elsewhere, and also not have to worry about anyone gaining access to them and their sensitive material (passwords, etc.).
This, for me, is quicker than keeping them off-site, so to speak, and having sysprep direct there for the answer file, and then I just run "cd sysprep," followed by "sysprep /generalize /oobe /unattend:unattend.xml /shutdown," in an elevated command prompt.
Last edited by DrEmpiricism; 07 Sep 2016 at 09:53.