EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

Win32_PageFile class

The Win32_PageFileWMI 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

[Provider("CIMWin32")]class Win32_PageFile : CIM_Directory
{
  uint32   AccessMask;
  boolean  Archive;
  string   Caption;
  boolean  Compressed;
  string   CompressionMethod;
  string   CreationClassName;
  datetime CreationDate;
  string   CSCreationClassName;
  string   CSName;
  string   Description;
  string   Drive;
  string   EightDotThreeFileName;
  boolean  Encrypted;
  string   EncryptionMethod;
  string   Extension;
  string   FileName;
  uint64   FileSize;
  string   FileType;
  uint32   FreeSpace;
  string   FSCreationClassName;
  string   FSName;
  boolean  Hidden;
  uint32   InitialSize;
  datetime InstallDate;
  uint64   InUseCount;
  datetime LastAccessed;
  datetime LastModified;
  string   Manufacturer;
  uint32   MaximumSize;
  string   Name;
  string   Path;
  boolean  Readable;
  string   Status;
  boolean  System;
  string   Version;
  boolean  Writeable;
};

Members

The Win32_PageFile class has these types of members:

Methods

The Win32_PageFile class has these methods.

MethodDescription
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

Bitmask that represents the access rights required to access or perform specific operations on the page file. For bit values, see File and Directory Access Rights Constants.

Note  On FAT volumes, the FULL_ACCESS value is returned instead, which indicates that no security has been set on the object.

Archive
Data type: boolean
Access type: Read-only

If True, the file should be archived.

Caption
Data type: string
Access type: Read-only

Short description of the object.

Compressed
Data type: boolean
Access type: Read-only

If True, the file is compressed.

CompressionMethod
Data type: string
Access type: Read-only

Algorithm or tool used to compress the logical file. If it is not possible (or not desired) to describe the compression scheme (perhaps, because it is not known), use the following words: "Unknown" to represent that it is not known whether the logical file is compressed or not; "Compressed" to represent that the file is compressed but either its compression scheme is not known or not disclosed; and "Not Compressed" to represent that the logical file is not compressed.

CreationClassName
Data type: string
Access type: Read-only
Qualifiers: Key, MaxLen (256)

Name of the first concrete class to appear in the inheritance chain used in the creation of an instance. When used with the other key properties of the class, this property allows all instances of this class and its subclasses to be uniquely identified.

CreationDate
Data type: datetime
Access type: Read-only

File creation date.

CSCreationClassName
Data type: string
Access type: Read-only

Class of the computer system.

CSName
Data type: string
Access type: Read-only

Name of the computer system.

Description
Data type: string
Access type: Read-only

Description of the object.

Drive
Data type: string
Access type: Read-only

Drive letter (including colon) of the file.

Example: "c:"

EightDotThreeFileName
Data type: string
Access type: Read-only

DOS-compatible file name for this file.

Example: "c:\progra~1"

Encrypted
Data type: boolean
Access type: Read-only

If True, the file is encrypted.

EncryptionMethod
Data type: string
Access type: Read-only

Algorithm or tool used to encrypt the logical file. If it is not possible (or not desired) to describe the encryption scheme (perhaps for security reasons), use the following words: "Unknown" to represent that it is not known whether the logical file is encrypted or not; "Encrypted" to represent that the file is encrypted but either its encryption scheme is not known or not disclosed; and "Not Encrypted" to represent that the logical file is not encrypted.

Extension
Data type: string
Access type: Read-only

File name extension (without the dot).

Examples: "txt", "mof", "mdb"

FileName
Data type: string
Access type: Read-only

Name (without extension) of the file.

Example: "autoexec"

FileSize
Data type: uint64
Access type: Read-only

Size of the file (in bytes).

For more information about using uint64 values in scripts, see Scripting in WMI.

FileType
Data type: string
Access type: Read-only

File type (indicated by the Extension property).

FreeSpace
Data type: uint32
Access type: Read-only
Qualifiers: Deprecated, 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

Class of the file system.

FSName
Data type: string
Access type: Read-only

Name of the file system.

Hidden
Data type: boolean
Access type: Read-only

If True, the file is hidden.

InitialSize
Data type: uint32
Access type: Read-only
Qualifiers: Deprecated, Units (Megabytes)

Initial size of the page file.

InstallDate
Data type: datetime
Access type: Read-only

Object was installed. This property does not need a value to indicate that the object is installed.

InUseCount
Data type: uint64
Access type: Read-only

Number of "file opens" that are currently active against the file.

For more information about using uint64 values in scripts, see Scripting in WMI.

LastAccessed
Data type: datetime
Access type: Read-only

Date and time the file was last accessed.

LastModified
Data type: datetime
Access type: Read-only

Date and time the file was last modified.

Manufacturer
Data type: string
Access type: Read-only

Manufacturer name from the version resource, if one is present.

MaximumSize
Data type: uint32
Access type: Read-only
Qualifiers: Deprecated, 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

Name of the page file.

Example: "C:\PAGEFILE.SYS"

Path
Data type: string
Access type: Read-only

Path of the file. This includes leading and trailing backslashes.

Example: "\windows\system\"

Readable
Data type: boolean
Access type: Read-only

If True, the file can be read.

Status
Data type: string
Access type: Read-only

Current status of the object. Various operational and nonoperational statuses can be defined. Operational statuses include: "OK", "Degraded", and "Pred Fail" (an element, such as a SMART-enabled hard disk drive, may be functioning properly but predicting a failure in the near future). Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is online, yet the managed element is neither "OK" nor in one of the other states.

The values are:

"OK"
"Error"
"Degraded"
"Unknown"
"Pred Fail"
"Starting"
"Stopping"
"Service"
System
Data type: boolean
Access type: Read-only

If True, the file is a system file.

Version
Data type: string
Access type: Read-only

Version name from the version resource, if one is present.

Writeable
Data type: boolean
Access type: Read-only

If True, the file can be written.

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

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Namespace

\root\CIMV2

MOF

CIMWin32.mof

DLL

CIMWin32.dll

See also

Operating System Classes

 

 

Mostrar:
© 2014 Microsoft