Modifying WMI queries

Started by RMPF2

RMPF2

Modifying WMI queries   13 September 2013, 05:47

Hi Andrew!!! I want to know if you can arrange something to make possible the alteration of the following query:

For example to find the Entire RAM Size of a PC

SELECT Capacity FROM Win32_PhysicalMemory

This is what we got:

A result like this

268435456, 268435456, 524288

But what if we want something like 4 GB


Maybe if we can modify the whole column result, like having a mask or a number format or a calculation to the ram size column like:

New column value or a new variable for that column = sum(Ram size) / (1024^2)

This is just an example the calculation might be wrong...


Or if something like this is possible

Ex. SELECT Sum(Capacity+1) FROM Win32_PhysicalMemory
SoftPerfect Support forum - Andrew avatar image

Re: Modifying WMI queries   13 September 2013, 08:31

Just use SELECT TotalPhysicalMemory FROM Win32_ComputerSystem.

The result will still be in bytes though.

I suppose the network scanner may need some support of regular expressions and/or basic arithmetic in columns.

WMI QUERIES   13 September 2013, 14:12

Or, you could just add the WMI query in a VBScript. You can customize it anyway you like. smile
rmpf2

WMI QUERIES   13 September 2013, 23:57

Hi thanks both of you for your time and patience.

Add WMI query in a VBScript might resolve but If you implement support of regular expressions and/or basic arithmetic in columns would be awesome, truly amazing!!!

I know you told me this might be some day. But to not let it die I refresh it...Sorry...

...And if posible Search functionaliy implemented on Application tab and on Manage Bookmaks Menu.

...And Import and Export buttons on Application tab, like those implemented on Manage bookmarks window.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 ********  **     **  ********   ******   **    ** 
    **     **     **     **     **    **   **  **  
    **     **     **     **     **          ****   
    **     *********     **     **           **    
    **     **     **     **     **           **    
    **     **     **     **     **    **     **    
    **     **     **     **      ******      **    

Message: