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
Four different BSOD's including C9, C1, D1, and 0x1000007e
I'm running windows 7 x64 on a custom built machine. All the hardware is about 8 months old aside from the HDD. After a couple of days of trying to figure this out, i'm officially stuck. So far each BSOD has given me a different BC Code. I'm not sure if this is a result of enabling the driver...
BSOD Help and Support
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...
Backup Laptop including OS
Hi, I want to backup my laptop in such a way that even if I install a new OS I can still get everything back including the OLD OS itself.
Backup and Restore
Bat commands..
Okay im trying to make a mini-fool for my friend :D And i want to my friend donot see the bat file Is this the code to he cant see it? attrib +h %0 Thanks. - kuchiyo
General Discussion
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"...
Commands in Windows 7
Commands in Windows 7 If you like to work with Command Prompt commands here some new or Modified commands uses in Windows 7. For a more detailed explanation of all commands in Windows below, see: Command-Line Reference Windows Command Reference

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 17:22.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App