|
following code is giving some wrong output.
$_colItems = $_objWMIService.ExecQuery("Select * from CIM_OperatingSystem",,48) If @ERROR $_colItems = 0 Exit Val('&' + Right(DecToHex(@ERROR), 4)) EndIf For Each $_objItem In $_colItems
$_ = CINT((CDBL($_objItem.FreeSpaceInPagingFiles)) / 1024) ; Page file currently unused and available $_SI[13] = '' + $_ + $_SI[13]
Next $_colItems = 0
My system total page file size is 3046MB. By above code, free page file size is showing as 3497MB.
this is the code for total page file.
$_colItems = $_objWMIService.ExecQuery("Select * from Win32_PageFile",,48) If @ERROR $_colItems = 0 Exit Val('&' + Right(DecToHex(@ERROR), 4)) EndIf $_B = 0 For Each $_objItem In $_colItems
$_ = CINT((CDBL($_objItem.MaximumSize))) ; Total Page File $_B = $_B + $_
Next $_SI[12] = $_B $_colItems = 0
Can any one inform me what property i need to use so that i can get the exact free page file size.
|