Win32_PageFile class
The Win32_PageFile WMI class represents the file used for handling virtual memory file swapping on a Win32 system. This class has been deprecated.
The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties. Properties and methods are in alphabetic order, not MOF order.
Syntax
[DEPRECATED, Dynamic, Provider("CIMWin32"), Privileges("SeCreatePagefilePrivilege"), UUID("{8502C4C6-5FBB-11D2-AAC1-006008C78BC7}"), SupportsCreate, CreateBy("PutInstance"), SupportsDelete, DeleteBy("DeleteInstance"), SupportsUpdate, AMENDMENT]
class Win32_PageFile : CIM_DataFile
{
string Caption;
string Description;
datetime InstallDate;
boolean Archive;
boolean Compressed;
string CompressionMethod;
string CreationClassName;
datetime CreationDate;
string CSCreationClassName;
string CSName;
string Drive;
string EightDotThreeFileName;
boolean Encrypted;
string EncryptionMethod;
string Extension;
string FileName;
uint64 FileSize;
string FileType;
string FSCreationClassName;
string FSName;
boolean Hidden;
uint64 InUseCount;
datetime LastAccessed;
datetime LastModified;
string Path;
boolean Readable;
boolean System;
boolean Writeable;
uint32 AccessMask;
string Manufacturer;
string Status;
string Version;
uint32 FreeSpace;
uint32 InitialSize;
uint32 MaximumSize;
string Name;
};
Members
The Win32_PageFile class has these types of members:
Methods
The Win32_PageFile class has these methods.
Method | Description |
---|---|
ChangeSecurityPermissions | Class method that changes the security permissions for the logical file specified in the object path. |
ChangeSecurityPermissionsEx | Class method that changes the security permissions for the logical file specified in the object path. |
Compress | Class method that compresses the logical file (or directory) specified in the object path. |
CompressEx | Class method that compresses the logical file (or directory) specified in the object path. |
Copy | Class method that copies the logical file or directory specified in the object path to the location specified by the input parameter. |
CopyEx | Class method that copies the logical file or directory specified in the object path to the location specified by the FileName parameter. |
Delete | Class method that deletes the logical file (or directory) specified in the object path. |
DeleteEx | Class method that deletes the logical file (or directory) specified in the object path. |
GetEffectivePermission | Class method that determines whether the caller has the aggregated permissions specified by the Permission argument not only on the file object, but on the share the file or directory resides on (if it is on a share). |
Rename | Class method that renames the logical file (or directory) specified in the object path. |
TakeOwnerShip | Class method that obtains ownership of the logical file specified in the object path. |
TakeOwnerShipEx | Class method that obtains ownership of the logical file specified in the object path. |
Uncompress | Class method that uncompresses the logical file (or directory) specified in the object path. |
UncompressEx | Class method that uncompresses the logical file (or directory) specified in the object path. |
Properties
The Win32_PageFile class has these properties.
-
AccessMask
-
-
Data type: uint32
-
Access type: Read-only
-
Qualifiers: Schema ("Win32"), DisplayName ("Access Rights")
Bitmask that represents the access rights required to access or perform specific operations on the file. For values, see File and Directory Access Rights Constants.
This property is inherited from CIM_LogicalFile.
-
-
FILE_READ_DATA (file) or FILE_LIST_DIRECTORY (directory) (1)
-
FILE_WRITE_DATA (file) or FILE_ADD_FILE (directory) (2)
-
FILE_APPEND_DATA (file) or FILE_ADD_SUBDIRECTORY (directory) (4)
-
FILE_READ_EA (8)
-
FILE_WRITE_EA (16)
-
FILE_EXECUTE (file) or FILE_TRAVERSE (directory) (32)
-
FILE_DELETE_CHILD (directory) (64)
-
FILE_READ_ATTRIBUTES (128)
-
FILE_WRITE_ATTRIBUTES (256)
-
DELETE (65536)
-
READ_CONTROL (131072)
-
WRITE_DAC (262144)
-
WRITE_OWNER (524288)
-
SYNCHRONIZE (1048576)
Archive
-
Data type: boolean
-
Access type: Read-only
-
Qualifiers: Schema ("Win32"), DisplayName ("Should Be Archived")
If True, the file should be archived.
This property is inherited from CIM_LogicalFile.
Caption
-
Data type: string
-
Access type: Read-only
-
Qualifiers: MaxLen (64), DisplayName ("Caption")
A short textual description of the object.
This property is inherited from CIM_ManagedSystemElement.
Compressed
-
Data type: boolean
-
Access type: Read-only
-
Qualifiers: Schema ("Win32"), DisplayName ("Compressed")
If True, the file is compressed.
This property is inherited from CIM_LogicalFile.
CompressionMethod
-
Data type: string
-
Access type: Read-only
-
Qualifiers: DisplayName ("Compression Method")
Free-form string that indicates the algorithm or tool used to compress the logical file. If the compression scheme is unknown or not described, use "Unknown". If the logical file is compressed, but the compression scheme is unknown or not described, use "Compressed". If the logical file is not compressed, use "Not Compressed".
This property is inherited from CIM_LogicalFile.
CreationClassName
-
Data type: string
-
Access type: Read-only
-
Qualifiers: CIM_Key, DisplayName ("Class Name")
Name of the class.
This property is inherited from CIM_LogicalFile.
CreationDate
-
Data type: datetime
-
Access type: Read-only
-
Qualifiers: DisplayName ("Creation Date")
Date and time of the file's creation.
This property is inherited from CIM_LogicalFile.
CSCreationClassName
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Propagated ("CIM_FileSystem.CSCreationClassName"), CIM_Key, DisplayName ("Computer System Class Name")
Class of the computer system.
This property is inherited from CIM_LogicalFile.
CSName
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Propagated ("CIM_FileSystem.CSName"), CIM_Key, DisplayName ("Computer System Name")
Name of the computer system.
This property is inherited from CIM_LogicalFile.
Description
-
Data type: string
-
Access type: Read-only
-
Qualifiers: DisplayName ("Description")
A textual description of the object.
This property is inherited from CIM_ManagedSystemElement.
Drive
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Fixed, Schema ("Win32"), DisplayName ("Drive")
Drive letter (including the colon that follows the drive letter) of the file. This property is inherited from CIM_LogicalFile.
Example: "c:"
This property is inherited from CIM_LogicalFile.
EightDotThreeFileName
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Schema ("Win32"), DisplayName ("Eight Dot Three File Name")
DOS-compatible file name.
Example: "c:\progra~1"
This property is inherited from CIM_LogicalFile.
Encrypted
-
Data type: boolean
-
Access type: Read-only
-
Qualifiers: Schema ("Win32"), DisplayName ("Encrypted")
If True, the file is encrypted.
This property is inherited from CIM_LogicalFile.
EncryptionMethod
-
Data type: string
-
Access type: Read-only
-
Qualifiers: DisplayName ("Encryption Method")
Free-form string that identifies the algorithm or tool used to encrypt a logical file. If the encryption scheme is not indulged (for security reasons, for example), use "Unknown". If the file is encrypted, but either its encryption scheme is unknown or not disclosed, use "Encrypted". If the logical file is not encrypted, use "Not Encrypted".
This property is inherited from CIM_LogicalFile.
Extension
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Fixed, Schema ("Win32"), DisplayName ("File Extension")
File name extension without the preceding period (dot).
Example: "txt", "mof", "mdb"
This property is inherited from CIM_LogicalFile.
FileName
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Fixed, Schema ("Win32"), DisplayName ("File Name")
File name without the file name extension. Example: "MyDataFile"
This property is inherited from CIM_LogicalFile.
FileSize
-
Data type: uint64
-
Access type: Read-only
-
Qualifiers: DisplayName ("Size"), Units ("bytes")
Size of the file, in bytes.
For more information about using uint64 values in scripts, see Scripting in WMI.
This property is inherited from CIM_LogicalFile.
FileType
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Schema ("Win32"), DisplayName ("File Type")
Descriptor that represents the file type indicated by the Extension property.
This property is inherited from CIM_LogicalFile.
FreeSpace
-
Data type: uint32
-
Access type: Read-only
-
Qualifiers: DEPRECATED, MappingStrings ("Win32API|Memory Management Structures|MEMORYSTATUS|dwAvailPageFile"), Units ("megabytes")
Space available in the paging file. The operating system can enlarge the paging file as necessary, up to the limit imposed by the user. This property shows the difference between the size of current committed memory and the current size of the paging file; it does not show the largest possible size of the paging file.
FSCreationClassName
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Propagated ("CIM_FileSystem.CreationClassName"), CIM_Key, DisplayName ("File System Class Name")
Class of the file system.
This property is inherited from CIM_LogicalFile.
FSName
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Propagated ("CIM_FileSystem.Name"), CIM_Key, DisplayName ("File System Name")
Name of the file system.
This property is inherited from CIM_LogicalFile.
Hidden
-
Data type: boolean
-
Access type: Read-only
-
Qualifiers: Schema ("Win32"), DisplayName ("Hidden")
If True, the file is hidden.
This property is inherited from CIM_LogicalFile.
InitialSize
-
Data type: uint32
-
Access type: Read-only
-
Qualifiers: DEPRECATED, MappingStrings ("Win32Regstry|System\\CurrentControlSet\\Control\\Session Manager\\Memory Management|PagingFiles"), Units ("megabytes")
Initial size of the page file.
InstallDate
-
Data type: datetime
-
Access type: Read-only
-
Qualifiers: MappingStrings ("MIF.DMTF|ComponentID|001.5"), DisplayName ("Install Date")
Indicates when the object was installed. Lack of a value does not indicate that the object is not installed.
This property is inherited from CIM_ManagedSystemElement.
InUseCount
-
Data type: uint64
-
Access type: Read-only
-
Qualifiers: DisplayName ("Current File Open Count")
Number of "file opens" that are currently active against the file.
For more information about using uint64 values in scripts, see Scripting in WMI.
This property is inherited from CIM_LogicalFile.
LastAccessed
-
Data type: datetime
-
Access type: Read-only
-
Qualifiers: DisplayName ("Last Accessed")
Date and time the file was last accessed.
This property is inherited from CIM_LogicalFile.
LastModified
-
Data type: datetime
-
Access type: Read-only
-
Qualifiers: DisplayName ("Last Modified")
Date and time the file was last modified.
This property is inherited from CIM_LogicalFile.
Manufacturer
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Schema ("Win32"), DisplayName ("Manufacturer")
Manufacturer string from the version resource (if one is present).
This property is inherited from CIM_DataFile.
MaximumSize
-
Data type: uint32
-
Access type: Read-only
-
Qualifiers: DEPRECATED, MappingStrings ("Win32API|Memory Management Structures|MEMORYSTATUS|dwTotalPageFile"), units ("megabytes")
Maximum size of the page file as set by the user. The operating system will not allow the page file to exceed this limit.
Name
-
Data type: string
-
Access type: Read-only
-
Qualifiers: DEPRECATED, Override ("Name"), MappingStrings ("Win32DLL|NTDLL.DLL|NtQuerySystemInformation|SystemPageFileInformation|PageFileName")
Name of the page file.
Example: "C:\PAGEFILE.SYS"
Path
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Fixed, Schema ("Win32"), DisplayName ("Path")
Path of the file including the leading and trailing backslashes.
Example: "\windows\system\"
This property is inherited from CIM_LogicalFile.
Readable
-
Data type: boolean
-
Access type: Read-only
-
Qualifiers: DisplayName ("Readable")
If True, the file can be read.
This property is inherited from CIM_LogicalFile.
Status
-
Data type: string
-
Access type: Read-only
-
Qualifiers: MaxLen (10), DisplayName ("Status")
String that indicates the current status of the object.
This property is inherited from CIM_ManagedSystemElement.
Values include the following:
OK ("OK")
Error ("Error")
Degraded ("Degraded")
Unknown ("Unknown")
Pred Fail ("Pred Fail")
Starting ("Starting")
Stopping ("Stopping")
Service ("Service")
Stressed ("Stressed")
NonRecover ("NonRecover")
No Contact ("No Contact")
Lost Comm ("Lost Comm")
System
-
Data type: boolean
-
Access type: Read-only
-
Qualifiers: Schema ("Win32"), DisplayName ("System File")
If True, the file is a system file.
This property is inherited from CIM_LogicalFile.
Version
-
Data type: string
-
Access type: Read-only
-
Qualifiers: Schema ("Win32"), DisplayName ("Version")
Version string from the version resource (if one is present).
This property is inherited from CIM_DataFile.
Writeable
-
Data type: boolean
-
Access type: Read-only
-
Qualifiers: DisplayName ("Writeable")
If True, the file can be written.
This property is inherited from CIM_LogicalFile.
Remarks
The Win32_PageFile class is derived from CIM_Directory.
Examples
The following VBScript code sample demonstrates how to retrieve page file stats from instances of Win32_PageFile.
Set PageFileSet = GetObject("winmgmts:").InstancesOf ("Win32_PageFile")
for each PageFile in PageFileSet
WScript.Echo PageFile.Name & Chr(13)
WScript.Echo " Initial: " & PageFile.InitialSize & " MB"
WScript.Echo " Max: " & PageFile.MaximumSize & " MB"
next
The following Perl code sample demonstrates how to retrieve page file stats from instances of Win32_PageFile.
use strict;
use Win32::OLE;
my $PageFileSet;
eval { $PageFileSet = Win32::OLE->GetObject("winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2")->
InstancesOf ("Win32_PageFile"); };
if (!$@ && defined $PageFileSet)
{
foreach my $PageFileInst (in $PageFileSet)
{
print "\n$PageFileInst->{Name}\n";
print " Initial: $PageFileInst->{InitialSize} MB\n";
print " Maximum: $PageFileInst->{MaximumSize} MB\n";
}
}
else
{
print STDERR Win32::OLE->LastError, "\n";
}
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista |
Minimum supported server |
Windows Server 2008 |
Namespace |
Root\CIMV2 |
MOF |
|
DLL |
|
See also