Microsoft® Windows® 2000 Scripting Guide
« Previous | Next »
When you install Windows on a computer, the operating system automatically sets up and configures a page file for you. In many cases, those settings will be adequate, and you will never need to reconfigure the page file.
In other cases, however, the settings might prove less than optimal. If a page file is too small, applications might run short on virtual memory. If a page file is too large, you might be wasting disk space that could be used for other purposes. In either case, you can reconfigure the page file settings in order to promote faster and more efficient computing.
You can use the Win32_PageFileSetting class to modify both the initial size and the maximum size of any page file on your computer. Table 10.12 describes the properties of the Win32_PageFileSetting class.
Note
Table 10.12 Win32_PageFileSetting Properties
Property | Description |
---|---|
InitialSize | Initial size of the page file, in megabytes. |
MaximumSize | Maximum size of the page file, in megabytes. |
Name | Path and file name of the page file. |
Listing 10.21 contains a script that configures the page file properties on a computer. To carry out this task, the script must perform the following steps:
This returns a collection of all the page files on the computer.
Listing 10.21 Configuring Page File Properties
|
|
Send us your feedback | « Previous | Next » |