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

x
?
Solved

List installed software on remote computer using registry.

Posted on 2004-10-12
12
Medium Priority
?
350 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
[X]
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
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 1200 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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

704 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