Paraglider BartPE Plugins

SetPageFile Plugin

This is a plugin to create a pagefile on a specified drive with a specified size.

Usage:

SetPageFile {/a<TimeoutOption>}
            {/f<PageFileName>} 
            {/t<Timeout}
            {/i<MinimumSize>}
            {/m<MaximumSize>}
            <FileName> 
            <MinimumPageFileSize> 
            {<MaximumPageFileSize>}
            {/r}
            {/s <Shell Command Line>}

If no parameters are specified or the only parameters specified are the option type parameters starting with / then a dialog is presented allowing the page file drive and size to be selected. The option type parameters are only for controlling the behavior of the dialog.

The /a<TimeoutOption> option parameter species what happens when the timeout with the value specified by the /t option parameter triggers. If /a0 is specified then on the timeout the dialog is cancelled and no pagefile is created. If /a1 is specified then a page file will be created on the first drive in the dialog with the minimum size specified by the /i option parameter and the maximum size specified by the /m option parameter. If no /m option parameter is specified then the maximum size will be the same as the minimum size.

The /f<PageFileName> option parameter allows the name of the page file to be changed from the default pagefile.sys when the dialog is used to select the page file drive.

The /t<Timeout> option parameter specifies the timeout period in milliseconds after which the dialog is dismissed. Note that if a drive selection change is made in the list box or if focus is given to one of the size text boxes then the timer is cancelled.

The /i<MinimumSize> option parameter specifies the minimum size in megabytes of the page file that is created if chosen from the dialog and no size is entered in the minimum size textbox in the dialog. This is the value that will be used for the pagefile minimum size if the dialog times out.

The /i<MaximumSize> option parameter specifies the maximum size in megabytes of the page file that is created if chosen from the dialog and no size is entered in the maximum size textbox in the dialog. This is the value that will be used for the pagefile maximum size if the dialog times out.

The /r option adds the ram drive to the drive list in the gui.

The /s < Shell Command Line > allows SetPageFile to be run as the shell. There must be at least one space between it at the rest of the command line. The rest of the command line is used to execute the real shell i.e. peloader ( its does not work with nu2shell ). Normally you would expect to use this option only when using the dialog.

The remaining three parameters are only used when the drive selection dialog is not used.

The <FileName> parameter must be a full path to the page file like c:\pagefile.sys

The <MinimumPageFileSize> parameter specifies the minimum page size in megabytes.

The optional <MaximumPageFileSize> parameter specifies the maximum page size in megabytes. If the parameter is not specified then the maximum size is set to be the same as the minimum size.


Example usage:

SetPageFile c:\pagefile.sys 512

This creates a page file named c:\pagefile.sys of size 512 megabyte

SetPageFile /t30000 /a1 /i512 /fpepage.sys

This shows the dialog for 30 seconds and will create a 512 megabyte pagefile named pepage.sys on the first drive shown in the dialog if the dialog times out. If a drive is selected from the dialog then the pagefile will be named pepage.sys on the selected drive.

If you wish to run with SetPageFile as the shell and use it to launch peloader then this is configured by adding this to the peloader plugin ( choose appropriate values for /t and /a - these are what I use ):

[SetupReg.AddReg]
0x2, "Setup", "CmdLine", "SetPageFile /t10000 /a0 /s PELoader.exe %SystemDrive%\Programs\Nu2Menu\nu2menu.exe"