Use Sysprep before Windows 2003 creates an image

Source: Internet
Author: User

This article describes how to use the Microsoft Sysprep tool to automate the deletion of a paging file before creating a Windows Server 2003 image (to reduce the time to copy an image or to reduce the overall size of the image).

Note: Microsoft recommends that you do not use Sysprep on a domain controller.

Warning: Improper use of Registry Editor can cause serious problems that may require you to reinstall your operating system. Microsoft is not guaranteed to resolve problems caused by improper use of the Registry Editor. Using Registry Editor requires your own risk.

To use Sysprep to finish deleting a paging file before creating a Windows Server 2003 image, use one of the following methods.

Method 1

Start the Registry Editor (Regedit.exe).

Locate the PagingFiles value in the following registry key:

Hkey_local_machine\system\currentcontrolset\control\sessionmanager\memory Management

Double-click the PagingFiles value, and then type the following:

C:\pagefile.sys00

Click OK.

Quit Registry Editor.

Then run Sysprep.

The registry setting in Method 1 forces Windows to delete the paging file when you close Windows. You can then use the method you prefer to create an installation partition image and deploy it to the target computer. During the first boot of the target system, the paging file settings above it will resize to match the memory modules of the newly deployed system. (Programming Entry Network)

Method 2

Use any of the following procedures to create a registry (. reg) file named Zeropage.reg:

Start the Registry Editor (Regedit.exe).

Locate the PagingFiles value in the following registry key:

Hkey_local_machine\system\currentcontrolset\control\sessionmanager\memory Management

Double-click the PagingFiles value, and then type the following:

C:\pagefile.sys00

Click OK.

On the File menu, click Export, and then export the item to a file named Zeropage.reg.

Quit Registry Editor.

Copy the following text to a. reg file named Zeropage.reg:

WindowsRegistryEditorVersion5.00
[Hkey_local_machine\system\currentcontrolset\control\sessionmanager\memory Management]
"PagingFiles" =hex (7): 43,00,3a,00,5c,00,70,00,61,00,67,00,65,00,66,00,69,00,6c,\
00,65,00,2e,00,73,00,79,00,73,00,20,00,30,00,20,00,30,00,00,00,00,00

Copy the following text along with any other Sysprep command-line arguments to a batch file named Sysprep.cmd:

Regedit/sa:\zeropage.reg
A:\sysprep-noreboot-pnp

Marks a new computer memory match on the computer.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.