Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: fileSizeEX returns 0 for the Pagefile.sys file
Is there a reason why the command isn't returning the size of the file? Is there a better command to run to find out the setting for the pagefile?
;-------------------------------------------------------------------------------- ;The 2002E+ versions of Winbatch have a few new functions for enumerating OLE ;collections. This includes access to all the WMI information on the computer. ;WMI stands for 'Windows Management Instrumentation'. ;Here's the reference from Microsoft: ; ; msdn.microsoft.com/library/en-us/wmisdk/wmi/wmi_start_page.asp?frame=true ; msdn.microsoft.com/library/en-us/wmisdk/wmi/wmi_reference.asp?frame=true ; ; And here are some Winbatch examples: ; ;techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/WMI+!WMI~Reference!.txt ;For details on the Win32_Bios WMI Class, see: ; ; msdn.microsoft.com/library/en-us/wmisdk/wmi/win32_bios.asp?frame=true ; ; ;-------------------------------------------------------------------------------- ; Locator = ObjectOpen("WbemScripting.SWbemLocator") Service = Locator.ConnectServer() Security = Service.Security_ Security.ImpersonationLevel = 3 MemSet = Service.InstancesOf("Win32_LogicalMemoryConfiguration") hEnum = ObjectCollectionOpen(MemSet) While 1 Mem = ObjectCollectionNext(hEnum) If Mem == 0 Then Break TotalPhysicalMemory = Mem.TotalPhysicalMemory TotalVirtualMemory = Mem.TotalVirtualMemory TotalPageFileSpace = Mem.TotalPageFileSpace ObjectClose(Mem) EndWhile ObjectCollectionClose(hEnum) ObjectClose(MemSet) ObjectClose(Security) ObjectClose(Service) ObjectClose(Locator) Message("TotalPhysicalMemory",TotalPhysicalMemory) Message("TotalVirtualMemory", TotalVirtualMemory) Message("TotalPageFileSpace", TotalPageFileSpace) Exit
Article ID: W15358
File Created: 2014:07:18:09:12:00
Last Updated: 2014:07:18:09:12:00