Microsoft small business knowledge base

Article ID: 974028 - Last Review: August 27, 2009 - Revision: 1.1


Pagefile settings are stored in the following registry entry on a computer that is running Windows Vista, Windows Server 2008, Windows 7, or Windows Server 2008 R2:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PagingFiles
If you run the following command, the REG_MULTI_SZ value of this registry entry is set to "C:\pagefile.sys 0 0":
wmic computersystem set AutomaticManagedPageFile=FALSE
This issue causes the loss of existing pagefile settings for operating systems that have the following pagefile settings:
  • The initial and maximum pagefile sizes are explicitly specified.
    For example:
    C:\pagefile.sys 4095 4095
  • Multiple pagefiles are on multiple volumes.
    For example:
    C:\pagefile.sys 8200 8200
    D:\pagefile.sys 8200 8200
    E:\pagefile.sys 8200 8200
Note The problem also occurs if the AutomaticManagedPagefile property of the WMI Win32_ComputerSystem class is set to "FALSE" by program code by using the COM interface.


Method 1
Confirm the current setting of the page file by running the following command:
wmic computersystem get AutomaticManagedPageFile
Also, avoid setting the value to "FALSE" if it is already set to "FALSE."

Method 2
Run VBScript code instead of the wmic command to disable the AutomaticManagedPageFile property. To do this, follow these steps:
  1. Start Notepad.
  2. Paste the following code into Notepad:
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
        & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    For Each objCS in objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
        on Error Resume Next
    '    Wscript.Echo "AutomaiticManagedPagefile: " & objCS.AutomaticManagedPagefile
        If (objCS.AutomaticManagedPagefile) Then
            Wscript.Echo "Setting AutomaticManagedPagefile to False"
            Wscript.Echo "AutomaticManagedPagefile was already False. Just leaving"
        End If
    '    Wscript.Echo "AutomaiticManagedPagefile: " & objCS.AutomaticManagedPagefile
  3. On the File menu, click Save as.
  4. Select a destination, type AutomaiticManagedPagefile.vbs in the File name box, and then click Save.
  5. Run the AutomaiticManagedPagefile.vbs script on your computer.


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.


The WMI provider of the Win32_ComputerSystem class is implemented in CimWin32.dll. This .dll file changes the following registry value when the AutomaticManagedPageFile property of the WMI Win32_ComputerSystem class is changed:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PagingFiles
If the AutomaticManagedPageFile property is set to TRUE, the value is set to "?:\pagefile.sys." If the AutomaticManagedPageFile property is set to FALSE, the value is set to "c:\pagefile.sys 0 0." Therefore, any other page file settings are overwritten when this issue occurs.

For more information, click the following article number to view the article in the Microsoft Knowledge Base:
959516  ( ) Multiple pagefiles are created when you set the AutomaticManagedPagefile property of the Win32_ComputerSystem class to False on a computer that is running Windows Server 2008 or Windows Vista Service Pack 1

  • Windows Server 2008 Datacenter without Hyper-V
  • Windows Server 2008 Enterprise without Hyper-V
  • Windows Server 2008 for Itanium-Based Systems
  • Windows Server 2008 Standard without Hyper-V
  • Windows Server 2008 Datacenter
  • Windows Server 2008 Enterprise
  • Windows Server 2008 Standard
  • Windows Server 2008 R2 Datacenter
  • Windows Server 2008 R2 Enterprise
  • Windows Server 2008 R2 Standard
  • Windows 7 Enterprise
  • Windows 7 Home Basic
  • Windows 7 Home Premium
  • Windows 7 Professional
  • Windows 7 Starter
  • Windows 7 Ultimate
  • Windows Vista Enterprise 64-bit Edition
  • Windows Vista Home Basic 64-bit Edition
  • Windows Vista Home Premium 64-bit Edition
  • Windows Vista Ultimate 64-bit Edition
  • Windows Vista Business 64-bit Edition
  • Windows Vista Enterprise
  • Windows Vista Home Basic
  • Windows Vista Home Premium
  • Windows Vista Starter
  • Windows Vista Ultimate
  • Windows Vista Business
kbtshoot kbsurveynew kbexpertiseinter kbinfo KB974028
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support