Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


getting registry size in wmi or vb

Posted on 2006-06-13
Medium Priority
Last Modified: 2012-06-27
Hey, I want to be able to get the registry size of a windows 2000 workstation. It would be cool if it could loop through and get a bunch of machine names.
Question by:tuckcorp
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

Expert Comment

ID: 16896959
1. In Control Panel, double-click System.  
2. On the Performance tab, click Change in the Virtual Memory section.  
3. In the Virtual Memory dialog box, in the Registry Size section, the current registry size and the maximum registry size are displayed.  I hope this helps you out...Booda2us

Author Comment

ID: 16897021
Thanks, but I need a way to connect to a remote machine and get this info

Accepted Solution

Krompton earned 2000 total points
ID: 16897123
Try this...

Save this as a .vbs file
Change the (".",".") to ("computer01","computer2",etc...)

On Error Resume Next

Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20

arrComputers = Array(".",".")
For Each strComputer In arrComputers
   Msg = Msg & VBCrLf & "Computer Registry Info for: " & strComputer

   Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
   Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Registry", "WQL", _
                                          wbemFlagReturnImmediately + wbemFlagForwardOnly)

   For Each objItem In colItems
      Msg = Msg & VBCrLf & "CurrentSize: " & objItem.CurrentSize
      Msg = Msg & VBCrLf & "MaximumSize: " & objItem.MaximumSize
      Msg = Msg & VBCrLf & "InstallDate: " & WMIDateStringToDate(objItem.InstallDate)
      Msg = Msg & VBCrLf & "Name: " & objItem.Name
      Msg = Msg & VBCrLf & "Status: " & objItem.Status
      Msg = Msg & VBCrLf
      Msg = Msg & VBCrLf
   WScript.Echo Msg

Function WMIDateStringToDate(dtmDate)
      WMIDateStringToDate = CDate(Mid(dtmDate, 5, 2) & "/" & _
      Mid(dtmDate, 7, 2) & "/" & Left(dtmDate, 4) _
      & " " & Mid (dtmDate, 9, 2) & ":" & Mid(dtmDate, 11, 2) & ":" & Mid(dtmDate,13, 2))
End Function

LVL 13

Expert Comment

ID: 16897189
there is a tool by microsoft named: DUREG.EXE
that check your registry size. you can download it free from
here :

about WMI , well i hope this one will work for you:
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Registry",,48)

For Each objItem in colItems
   WScript.Echo "Caption: " & objItem.Caption
   WScript.Echo "CurrentSize: " & objItem.CurrentSize
   WScript.Echo "Description: " & objItem.Description
   WScript.Echo "InstallDate: " & objItem.InstallDate
   WScript.Echo "MaximumSize: " & objItem.MaximumSize
   WScript.Echo "Name: " & objItem.Name
   WScript.Echo "ProposedSize: " & objItem.ProposedSize
   WScript.Echo "Status: " & objItem.Status
   WScript.Echo ""

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_UserInDomain",,48)

For Each objItem in colItems
   WScript.Echo "GroupComponent: " & objItem.GroupComponent
   WScript.Echo "PartComponent: " & objItem.PartComponent
   WScript.Echo ""


it's from :


Expert Comment

ID: 16901709

there are a number of very useful scripts available at

You can also download the Scriptomatic(V2) tool and create basic scripts you can modify quickly (quickly :) depends on your scripting knowledge of course) to suit your needs. That's where I created the one in my previous post. Took about 2 min.


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension ( This reminded me of questions tha…
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

722 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