Using WMIC to obtain system details, results not as expected

Posted on 2008-10-14
Last Modified: 2013-12-04
I am working on using Window's WMIC to obtain the total physical memory and total virtual memory (along with numerous other things). I get the expected total physical memory using:

C:\Documents and Settings\Administrator>wmic MemLogical get TotalPhysicalMemory /Value


This looks roughly about right since I have 1.5 GB of RAM on this machine. The problem is when I look for my total virtual memory I get:

C:\Documents and Settings\Administrator>wmic MemLogical get TotalVirtualMemory /Value


My Virtual Memory Settings:

Space available: 11738

Custom size:
Initial size: 2046
Max size: 4092

Total paging file size for all drives:
Min allowed: 2 MB
Recommended: 2301 MB
Currently allocated: 2046 MB

I cannot figure out what is being returned upon my total virtual memory request. Thus far I have not been able to find solid documentation on WMIC though I have found a few sources, none authoritize though. I noticed that VB has replicated this functionality at which states that the return is in bytes, however when doing the conversions I cannot figure out what the returned value trully represents.

Anyone have further insight, references?
Question by:techieBrandon
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 2
  • 2
LVL 63

Expert Comment

ID: 22715219
What does winmsd show you ? ( sysinfo32 )

You might find that you get more info there, and it can be run to create a test report with lots of relevant info.

Works on win98 and newer.

I hope this helps !

Author Comment

ID: 22731894
Thanks for the response, sorry for my delay.

I did some trials with winmsd but it does not output the virtual memory, or processor speed, in other regards a good tool though.

C:\Documents and Settings\Administrator>winmsd /a /f > 


*******************************  SYSTEM SUMMARY  *******************************
OS information: Microsoft Windows XP
OS version: 5.10.2600   Service Pack 2
Processor: x86 Family 6 Model 9 Stepping 5
Memory: 1,571,760 kb
BIOS version: 3.16  (1RETDKWW)
Machine type-Model: 23738U2

******************************  BIOS INFORMATION  ******************************

LVL 41

Expert Comment

ID: 22740430
It looks like you're trying to get to the TotalPageFileSpace (the amount of Physical Page file + the amount of Physical Ram).   Is that correct?   If so, then just use:
    wmic MemLogical get TotalPageFileSpace /Value
The documentation for these values is at:
Note:  There is a comment in the documentation that says that these values are no longer supported and to use another value instead.   But it seems to still work for me
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 22741565
Hi grave, thanks for the response.

What I am looking for is the virtual memory configured for the current operating system. The command would be:

wmic MemLogical get TotalVirtualMemory /Value

The problem I am having is the result, which is:


I am unsure what this 890788 is measured in, kb or byte I would assume but doing the math it doesn't fit with what I would expect on this machine.

I will have a look at the site you linked shortly. Thanks!

Author Comment

ID: 22741651
Just FYI, the command:

C:\Documents and Settings\Administrator>systeminfo


Total Physical Memory:     1,535 MB
Available Physical Memory: 58 MB
Virtual Memory: Max Size:  2,048 MB
Virtual Memory: Available: 1,996 MB
Virtual Memory: In Use:    52 MB
LVL 63

Expert Comment

ID: 22744692
depends on the OS.

IN XP it does show RAM, CPU speed and a bunch of other stuff by category

try winmsd /report filename.txt
also called msinfo32 on XP and newer.

LVL 41

Expert Comment

ID: 22744747
Well... it's quite possible that the reason that you're getting bad informatio from the Win32_LogicalMemoryConfiguration class is because it's no longer supported.
Recall that I mentioned that the documentation suggests that you discontinue using Win32_LogicalMemoryConfiguration  (which uses the alias of "MemLogical" in WMIC) and instead use similar fields from the Win32_OperatingSystem class (which uses the alias of "OS" in WMIC)

Author Comment

ID: 22799235
Hey, thanks to both of you for quick response, sorry mine haven't been as prompt.

I will give both a shot this afternoon and see what works and make another post later. Thanks again

Author Comment

ID: 22890679
I have not had time to look into this any further, will update ASAP

Accepted Solution

techieBrandon earned 0 total points
ID: 23283113
I wish I could update this with what I did, but alas, I have forgotten... however my guess is that I used systeminfo

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT ( The crux of this batch f…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA.…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question