How to automatically delete the paging file when you use the Sysprep.exe tool to create an image of Windows Server 2003, Windows XP, or Windows 2000

Article translations Article translations
Article ID: 892104 - View products that this article applies to.
Expand all | Collapse all

On This Page

INTRODUCTION

This article describes how to automatically delete the paging file when you use the System Preparation tool (Sysprep.exe) to create an image of Microsoft Windows Server 2003, Windows XP, or Windows 2000. To delete the paging file, the size of the paging file must be set to zero. Deleting the paging file lets you reduce the total size of the image. The smaller image size may reduce the time that is required to copy the image.

Note We do not recommend that you use the Sysprep.exe tool on a domain controller.

MORE INFORMATION

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
To automatically delete the paging file when you use the Sysprep.exe tool to create an image of Windows, use one of the following methods.

Method 1

  1. Click Start, click Run, type regedit in the Open box, and then click OK.
  2. Locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
  3. In the right-pane, double-click PagingFiles.
  4. Type c:\pagefile.sys 0 0 in the Value data box, and then click OK.
  5. Quit Registry Editor.
  6. Restart the system.

    Note A temporary page file that is between 10 and 20 megabytes will be created.
  7. Run the Sysprep.exe tool. The setting of the page file on the target system is resized during the first start to match the new system's memory model.
Note This registry setting makes Windows delete the paging file when you shut down Windows. You can then use the method that you want to create an image of the partition where Windows is installed and to deploy the image to the destination computers. The first time that the destination computer is restarted after you deploy the image, the paging file is resized to match the memory model of the destination computer.

Method 2

After you run Sysprep, start in recovery console and delete the Pagefile.sys file before you capture the image. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:
255205
Q255205 How to Delete the Pagefile.sys File in Recovery Console

Properties

Article ID: 892104 - Last Review: December 3, 2007 - Revision: 2.4
APPLIES TO
  • Microsoft Windows Server 2003, Web Edition
  • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
  • Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
  • Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
  • Microsoft Windows Server 2003, Datacenter Edition for Itanium-Based Systems
  • Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems
  • Microsoft Windows Small Business Server 2003 Premium Edition
  • Microsoft Windows Small Business Server 2003 Standard Edition
  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Professional
  • Microsoft Windows XP Media Center Edition
  • Microsoft Windows XP Tablet PC Edition
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Professional Edition
  • Microsoft Windows 2000 Advanced Server
Keywords: 
kbenv kbmgmtservices kbhowto KB892104

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com