getting registry size in wmi or vb

Posted on 2006-06-13
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 500 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

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!

Question has a verified solution.

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

Just about everyone has an old PC laying around.  Ask anyone in the IT industry, whether they are a professional or play in it as a hobby.  From outdated Desktops to cheap "throwaway" laptops, they are all around and not as hard to "fix up" as you m…
As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, ( because one time I did this and I essentially had a bricked …
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.
Suggested Courses

623 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