Tips and Tricks for working with Windows PE 2.1

Tuesday, April 8, 2008

Scratch Space aka Ram Drive

One of the many benefits of WinPE 2 is the Ram Drive. This allows you to install applications as well as have more room for the installed applications to work with. This is generally called the Ram Drive by most people and Microsoft calls it the Scratch Space. There are many ways to create or modify the amount of Scratch Space the most common of which is the following registry key.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\FBWF] "WinPECacheThreshold"=dword:00000020

;dword:00000010 = 16 ; 0x10 = 16Mb ; 0x18 = 24Mb ; 0x20 = 32Mb ; 0x30 = 48Mb ; 0x40 = 64Mb ; 0x48 = 72Mb ; 0x60 = 96Mb ; 0x80 = 128Mb ; 0x100 = 256Mb

By looking at the values you can see that there are a few different sizes to choose from. The default value for WinPE is 32 MB which you can see equates to a value of "0x20" for this key. There is another less known way to implement this tweak and I feel for most beginners it is also the best route. For this we are going to assume you are using the default PE locations and settings. The default location for the WinPE working directory is "C:\winpe_x86". Personally I suggest you move this a directory deeper to be something along the lines of "C:\PE\winpe_x86" however this is up to personal prefrence. We will use the default for most examples here to help keep everything syncronized with Microsofts documentation. The reasoning for moving it a directory deeper is to have your miscellaneus files in the "C:\PE" directory along with your winpe_x86 directory.
Step 1: Mount your boot.wim to C:\winpe_x86 Step 2: Open a command prompt then navigate to the following directory... C:\Program Files\Windows AIK\Tools\PETools\ Step 3: Type the following command: peimg.exe /scratchspace=256 /image=C:\winpe_x86\mount\Windows
For the /scratchspace command you can specify the values of 32, 64, 128, 256, 512. Something thats intresting to note with using this method is that the smallest you can create is 32 MB. With the above registry tweak you can create an even smaller Scratch Space of 16 MB as well as many other more defined sizes.

0 comments: