Removing the Paging File


Removing the Paging File

By using the registry, you can remove the Windows paging file before running Sysprep. Simply change the REG_MULTI_SZ value PagingFiles to C:\pagefile.sys 0 0 immediately before running Sysprep. This value is in HKLM\SYSTEM\CurrentControlSet\Control\ Session Manager\Memory Management. The easiest way to change this value is to export the setting to a REG file (remove all settings but the PagingFiles setting from the REG file), and then add it to a batch file that also starts Sysprep with the command-line options that you need for creating the image. For example, you can add the command %SystemDrive%\Sysprep\Sysprep.cmd to the [GuiRunOnce] section of the Sysprep.inf file, and then add the following lines of code to the Sysprep.cmd file:

Regedit /s %SYSTEMDRIVE%\Sysprep\pagefile.reg  %SYSTEMDRIVE%\Sysprep\Sysprep.exe -mini -quiet -reseal -forceshutdown



Microsoft Windows Registry Guide
Microsoft Windows Registry Guide, Second Edition
ISBN: 0735622183
EAN: 2147483647
Year: 2003
Pages: 186

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net