Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Including some commands in an unatttend file

16 Aug 2012   #1

Windows 7
Including some commands in an unatttend file


Running the sysprep /generalize /oobe /reboot /unattend:c:\Unattend.xml command in Audit mode, how do I create an answer file that allows to:

1) include a partition in the system protection of Windows 7 SP1.

2) rename and put a password to the Administrator account.

3) permanently delete some system directory (even hidden ones).

4) eliminate this answer file when it has finished its execution.



My System SpecsSystem Spec
16 Aug 2012   #2

Windows 8.1 Pro RTM x64

I've not used this feature myself, but see if anything here helps: Windows 7: how to use Autounattend.xml and deploy the OS? |
My System SpecsSystem Spec
16 Aug 2012   #3

Windows 7 Enterprise 64bit

Most of what you have listed cannot be done via the Answer File. The Answer File does not affect partitioning, does not support renaming the Administrator account (though it does support setting a password), cannot delete directories (except via script which would be external to the Answer File), and does not support deleting itself once complete (again, except via script).

From what you’ve described in this thread and others, you really ought to take a look at the Microsoft Deployment Toolkit (MDT). MDT will allow you to automate the partitioning and has customizable support for actions throughout the deployment phases including post deployment scripts. Ideally, you would delete whatever directories you did not desire while customizing the system in Audit Mode, you can also use the answer file to create a user with Administrator rights and set a password for that user in the Answer File, though it will not affect the automatically disabled Administrator account. To perform that task, the proper method would be to perform the task via Local Policy or Group Policy. MDT also handles the location and cleanup of Answer Files and other deployment related files.

MDT is really the route to go considering the complexity of your requirements and the time you have in this thus far, MDT will take a bit to learn, but it will automate every part of the process once it is configured and provide limitless scalability for future deployments. A good place to start would be Automated Installation to Upgrade to Windows 7: Step-by-Step Guide from the Springboard Series on TechNet. There are a wide variety of additional resources including many step by step guides and detailed explanations of all of the tools and utilities available from Microsoft for deployment on the Deliver Page for Windows 7 on the Springboard Site on TechNet.
My System SpecsSystem Spec

31 Oct 2012   #4
Captain Awesome

Windows 8 Pro x64

Here is a tutorial that I created relating to developing a simple autounattend.xml file.
This uses WAIK and OSCDIMG to create a custom Windows bootable ISO file with the answer file in it.

Let me know if this is helpful for you.
-Chris H.

My System SpecsSystem Spec

 Including some commands in an unatttend file

Thread Tools

Similar help and support threads
Thread Forum
Check for Virus in Single File Including Zip or Other Compression
If one downloads a file using a browser they receive a download dialog to save or open a file. Questions: 1) Does Windows Defender check this file for viruses while it is being downloaded? 2) Does this check include compressed formats such as Zip or 7Zip open? 3) Once the file in on my...
System Security
How do I create a batch file to run commands on auto?
the thread that i made previously only got 1 answer that really didnt have anything to do with my problem so thought it would be ok if another one was made, and not trying to spam, here are the commands for the batch file netstop sppvc cd...
General Discussion
Are commands followed?
I have two files LXDUwbgw.exe, and lxduwbgw.exe. in two different folders. For brevity, LXDU is in Folder A and lxdu is in folder B. IF, a program goes to Folder A and asks for lxdu will it take LXDU or nothing? Thanks Sic
General Discussion
Display file date modified time including seconds.
When using Windows Explorer, a directory listing can show a number of different columns of course but it appears the default is Date Modified .. which is fine. However, it doesn't show "seconds". The same appears to be the case for the command line output for "dir". The only solution I've found...
Need help wih a .bat file commands
Im not sure if this is a grate place to ask this.. but... well Windows does speak DOS commands... well sorta :D anyway, im trying to set up a batch file that would first transfer all the files and subfolders from "a" folder to "b" folder, and then would delete all the subfolders and files in "a"...

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 05:16.
Twitter Facebook Google+