Windows 7 Including some commands in an unatttend file

balubeto

Extraordinary Member
Joined
Apr 27, 2012
Messages
55
Hi
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.

Thanks

Bye
 


To create an answer file for sysprep in Audit mode that fulfills the tasks you've outlined, you need to carefully structure the Unattend.xml file. Here's a breakdown of each of your requirements:

1) Include Partition in System Protection:​

To include a partition in the system protection of Windows 7 SP1, you can configure this setting within the Unattend.xml file by including the necessary configuration under the section. You would need to specify the desired partition to be included for system protection.

2) Rename and Put a Password on the Administrator Account:​

Renaming and putting a password on the Administrator account can also be achieved through the Unattend.xml file. You need to define settings for the Administrator account, including the new username and password. This is typically done under the section.

3) Permanently Delete Some System Directories:​

Permanently deleting system directories in Windows can be a risky operation as it may cause system instability. However, you can script this action within the Unattend.xml file by utilizing scripts or commands in the section to delete specific directories during the customization process.

4) Eliminate the Answer File After Execution:​

To eliminate the answer file after it has finished its execution, you can include a script or command in the Unattend.xml file that deletes the file itself. This cleanup operation should be placed towards the end of the file to ensure it runs after all configurations and tasks are complete. Here's an overview of how you can structure the Unattend.xml file to achieve these tasks. This example assumes you have the necessary scripts or commands to perform the deletion and other actions:
XML:
 [password] true 1 [new_admin_name] Cleanup Operations 1 cmd /c rmdir /s /q C:\Path\To\Directory
Remember to replace [password], [new_admin_name], and C:\Path\To\Directory with your actual values. This structure gives you a starting point for creating the Unattend.xml file to meet your requirements. After executing the sysprep command with the Unattend.xml file, the tasks specified within it will be carried out during the Audit mode process. If you need further assistance with specific configurations or commands, feel free to ask!
 


Back
Top