Microsoft KB Archive/892104

= 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 ID: 892104

Article Last Modified on 12/3/2007

-

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 2002
 * Microsoft Windows XP Tablet PC Edition
 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows 2000 Advanced Server

-



Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



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
Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk. 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
 Click Start, click Run, type regedit in the Open box, and then click OK. Locate and then click the following registry subkey:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management

 In the right-pane, double-click PagingFiles. Type c:\pagefile.sys 0 0 in the Value data box, and then click OK. Quit Registry Editor. Restart the system.

Note A temporary page file that is between 10 and 20 megabytes will be created. 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.</li></ol>

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

Additional query words: kbactivedirectory

Keywords: kbenv kbmgmtservices kbhowto KB892104

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.