Solved

List installed software on remote computer using registry.

Posted on 2004-10-12
12
344 Views
Last Modified: 2008-02-01
Hi,

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!

-Jonthemoon
0
Comment
Question by:Jonthemoon
12 Comments
 
LVL 3

Author Comment

by:Jonthemoon
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
   
    Do
        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
    Loop
0
 
LVL 9

Expert Comment

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

Author Comment

by:Jonthemoon
ID: 12288416
eeshahidt,
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?

-Jonthemoon
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

 
LVL 16

Expert Comment

by:jimbobmcgee
ID: 12288746
What values is it returning;  what is it not returning?
0
 
LVL 3

Author Comment

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

-JTM
0
 
LVL 76

Expert Comment

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

Author Comment

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

Thx
JTM
0
 
LVL 76

Accepted Solution

by:
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 (http://www.devx.com/GetHelpOn/10MinuteSolution/16914/0/page/2) 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
Next
0
 
LVL 76

Expert Comment

by:David Lee
ID: 12296281
Here's the link (http://www.microsoft.com/technet/scriptcenter/default.mspx) 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.
0

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

839 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