You are here:
ActiveXperts.com > ActiveXperts Network Monitor > WindowsManagement > Scripts > Operating System > Page Files
Quicklinks
You can use any of the VBScript programs below in ActiveXperts Network Monitor. Click here for an explanation about how to include scripts in ActiveXperts Network Monitor.
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
set objRefresher = CreateObject("WbemScripting.SWbemRefresher")
Set colItems = objRefresher.AddEnum _
(objWMIService, "Win32_PerfFormattedData_PerfOS_PagingFile").objectSet
objRefresher.Refresh
For i = 1 to 5
For Each objItem in colItems
Wscript.Echo "Caption: " & objItem.Caption
Wscript.Echo "Description: " & objItem.Description
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "Percent Usage: " & objItem.PercentUsage
Wscript.Echo "Percent Usage Peak: " & objItem.PercentUsagePeak
Wscript.Sleep 2000
objRefresher.Refresh
Next
Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colPageFiles = objWMIService.ExecQuery("Select * from Win32_PageFile")
For Each objPageFile in colPageFiles
Wscript.Echo "Creation Date: " & objPageFile.CreationDate
Wscript.Echo "Description: " & objPageFile.Description
Wscript.Echo "Drive: " & objPageFile.Drive
Wscript.Echo "File Name: " & objPageFile.FileName
Wscript.Echo "File Size: " & objPageFile.FileSize
Wscript.Echo "Initial Size: " & objPageFile.InitialSize
Wscript.Echo "Install Date: " & objPageFile.InstallDate
Wscript.Echo "Maximum Size: " & objPageFile.MaximumSize
Wscript.Echo "Name: " & objPageFile.Name
Wscript.Echo "Path: " & objPageFile.Path
Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colPageFiles = objWMIService.ExecQuery("Select * from Win32_PageFileUsage")
For Each objPageFile in colPageFiles
Wscript.Echo "Allocated Base Size: " & objPageFile.AllocatedBaseSize
Wscript.Echo "Current Usage: " & objPageFile.CurrentUsage
Wscript.Echo "Description: " & objPageFile.Description
Wscript.Echo "Install Date: " & objPageFile.InstallDate
Wscript.Echo "Name: " & objPageFile.Name
Wscript.Echo "Peak Usage: " & objPageFile.PeakUsage
Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colPageFiles = objWMIService.ExecQuery _
("Select * from Win32_PageFileSetting")
For Each objPageFile in colPageFiles
objPageFile.InitialSize = 300
objPageFile.MaximumSize = 600
objPageFile.Put_
Next