List installed software on remote computer using registry.

Posted on 2004-10-12
Last Modified: 2008-02-01

I've already done much as I can list all the data on my computer but I.m confused on how to use RegConnectRegistry and sent it to RegEnumEx or should I open using RegOpenEx?...

THanks for your help!

Question by:Jonthemoon

Author Comment

ID: 12287084
I've finally connected to the remote computer but it's giving me only some info and not all...
Why is that??
I'me using that. :

RegConnectRegistry "\\PCZ00100", hKey, TKey2
RegOpenKeyEx TKey2, strPath, 0, KEY_ALL_ACCESS, TKey
        StrBuff = String(255, vbNullChar)
        If RegEnumKeyEx(TKey, Cnt, StrBuff, 255, 0, vbNullString, 0, ByVal 0&) <> 0 Then Exit Do
        Cnt = Cnt + 1
        StrKey = Left(StrBuff, InStr(StrBuff, vbNullChar) - 1)
        ReDim Preserve sKeys(Cnt)
        sKeys(Cnt) = StrKey

Expert Comment

by:Shahid Thaika
ID: 12288268
Maybe you don't have permission to see all the data on the other person's computer!

Author Comment

ID: 12288416
We're on the intranet and I've tried as a user in the administrator group and it doesn't work.
I also tried to connect on to my computer from another one with my credentials and it still don't work.

Anyone has a hint?

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!

LVL 16

Expert Comment

ID: 12288746
What values is it returning;  what is it not returning?

Author Comment

ID: 12291918
It is returning some applications like Winzip, Windows Fixes, etc. But on 2 PC tested it didn't return MS Office XP.

LVL 76

Expert Comment

by:David Lee
ID: 12293637
It's a lot easier to do this using WMI.

Author Comment

ID: 12295712
Do you have a script using WMI??

LVL 76

Accepted Solution

David Lee earned 300 total points
ID: 12296111
The code below, generated by Microsoft's Scriptomatic tool, will get you a list of all software installed on a computer via Microsoft's MSI service.  But it may miss a few things if they didn't use MSI.  Here's a link ( to an article that describes this and offers code, in Listing 1, that purports to get everything.  The code presented in that article is straight VB, not VBScript.  It should be relatively simple to convert it to VBScript though.  

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Product",,48)
For Each objItem in colItems
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "IdentifyingNumber: " & objItem.IdentifyingNumber
    Wscript.Echo "InstallDate: " & objItem.InstallDate
    Wscript.Echo "InstallLocation: " & objItem.InstallLocation
    Wscript.Echo "InstallState: " & objItem.InstallState
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "PackageCache: " & objItem.PackageCache
    Wscript.Echo "SKUNumber: " & objItem.SKUNumber
    Wscript.Echo "Vendor: " & objItem.Vendor
    Wscript.Echo "Version: " & objItem.Version
LVL 76

Expert Comment

by:David Lee
ID: 12296281
Here's the link ( to the Microsoft Scripting web site.  Scriptomatic is located about 3/4 of the way down the page under Scripting Tools and Utilities.  However, when I click on that link I get sent back to the Scripting page, not to the Scriptomatic page.  Same thing for all four of the links there.  Maybe it'll work for you.  I've sent an email of to Microsoft advising them of the problem.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA saving file message display 5 82
Using "ScreenUpdating" 6 83
VB6 - Convert HH:MM into Decimal 8 69
Advice in Xamarin 21 107
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

680 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