Open-AudIT

What's on your network?
It is currently Mon Jan 22, 2018 10:08 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Tue Aug 07, 2007 7:40 am 
Offline
Helper

Joined: Thu Jun 14, 2007 4:06 am
Posts: 96
Location: Georgia, USA
Win32_LogicalMemoryConfiguration is depreciated in XP. It doesn't exist in WIndows Vista, so under "System Summary - Memory," nothing is listed for Vista. According to Microsoft (http://msdn2.microsoft.com/en-US/library/aa394181.aspx) Win32_OperatingSystem should be used instead.

So instead of using Win32_LogicalMemoryConfiguration - TotalPhysicalMemory we should use Win32_OperatingSystem - TotalVisibleMemorySize. On XP you will notice that both contain the same information. Below is the code I used to fix mine. I left in the Win32_LogicalMemoryConfiguration section in case there are compatibility issues. I'm not sure exactly when Win32_OperatingSystem - TotalVisibleMemorySize was added.

In audit.vbs under "System Information & Timezone" replace everything before the "Win32_ComputerSystem" section with this code:

Code:
'''''''''''''''''''''''''''''''''''''
'   System Information  & Timezone  '
'''''''''''''''''''''''''''''''''''''
comment = "System Info"
if verbose = "y" then
   wscript.echo comment
end if
On Error Resume Next
Set colItems = objWMIService.ExecQuery("Select * from Win32_LogicalMemoryConfiguration",,48)
mem_count = 0
For Each objItem in colItems
   mem_count = mem_count + objItem.Capacity
Next
if mem_count > 0 then
   mem_size = int(mem_count /1024 /1024)
else
   'Set colItems = objWMIService.ExecQuery("Select * from Win32_LogicalMemoryConfiguration",,48)
   For Each objItem in colItems
      mem_size = objItem.TotalPhysicalMemory
   Next
   If isempty(mem_size) Then
       Set colItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem",,48)
       For Each objItem in colItems
         mem_size = objItem.TotalVisibleMemorySize
       Next
   End If
   mem_size = int(mem_size /1024)
end if


Can someone verify this information is correct? I also commented out the following line:

Code:
'Set colItems = objWMIService.ExecQuery("Select * from Win32_LogicalMemoryConfiguration",,48)


The same line is directly above, so it seems redundant to me.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group