Note: Microsoft recommends that you do not use Sysprep on a domain controller.
Warning: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft does not guarantee that problems arising from improper use of the Registry Editor will be resolved. Use the Registry Editor at your own risk.
To use Sysprep to automate the removal of a paging file before you create 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.
Exit the 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 like to create the 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 be resized to match the memory modules of the new system after deployment.
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, 2144 mini-game and then export the item to a file named Zeropage.reg.
Exit the 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 and any other Sysprep command-line arguments to a batch file named Sysprep.cmd:
Regedit/sa:/zeropage.reg
A:/sysprep-noreboot-pnp
The new computer memory on the computer.