Need to get list of Apps both installed and available/published - 3 days research - Nothing!!

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Chris (benatar_at_gmail.com)
Date: 10/27/04


Date: 27 Oct 2004 01:18:08 -0700

Please someone help me. I'm pulling my hair out trying to do this. 3
days concerted effort and nada...

Basically what I am trying to achieve is to programatically get at the
same information that shows in the Add/Remove Programs utility.
Ultimately I want to do the following:

1. Determine what programs (GUID, Package/product Code) are installed
and whether they are machine, user, published or assigned.
2. Determine what programs (GUID, Package/product Code) are available
to be installed but are not currently - think group policy published
apps using AD here.
3. Install selected apps from item 2 above.
4. Repair or do a remove and reinstall for selected apps from item 1
above.

I've spent the last 3 days searching the web and the SDK without
success. What I can do is get a list of only the installed software
using:

set obj = createobject("WindowsInstaller.Installer")
Set products = obj.Products

and the same thing by using:

Set wbemServices = GetObject("winmgmts:\\" & strComputer &
"\root\rsop\computer")
Set wbemObjectSet = wbemServices.InstancesOf("RSOP_ApplicationManagementPolicySetting")

and even tried:

Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
Set colSoftware = objWMIService.ExecQuery _
    ("Select * from Win32_Product")

But this does not give me the available (published) software, just the
installed software. I have been investigating the following but cannot
work out how to implement them. Maybe someone out there can put me out
of my misery.

MsiEnumProducts
MsiGetProductInfo
RSOP_ApplicationManagementCategory
GetLocalManagedApplications

Or using some other function, perhaps in GPMC. I am trying to do this
in vbscript and the rest of the code will be (relativly) a breeze.
Please, someone out there must have a better understanding of the VB
objects/classes/functions/properties etc.

Regards

Chris



Relevant Pages

  • Re: Local Software Scanner for vulnerabilities
    ... Listing local installed software for all linux ... Comparing local software and CVEs to issue security alerts. ... Simple to install, cross platforms ... LanDesk and Shavlik are other competitors in that systems management ...
    (Security-Basics)
  • Re: sp2 is no good.
    ... For a detailed list of all installed software and hardware: ... In the Software Versions section you'll see all of your installed software. ... >>> When I installed sp2 it messed up my graphics. ... >>>>you didn't specify which video card you have, but i> suggest you get the>>latest driver for your video hardware,> go to the vendor's>>website, download the newest driver, install it,> reinstall SP2>>>>-->>francis>> ...
    (microsoft.public.windowsxp.general)
  • Re: Why wont XP give me the option to play my mp3 cd with my player of choice?
    ... >The fact is that you installed software that has "asserted" itself in many ... >Don't ever allow software to perform a so called standard install. ... >open Media Player (or whatever player you want to control the file ... Windows XP has nothing to do with your problem. ...
    (microsoft.public.windowsxp.general)
  • Re: Can Old Restore Points Be Used With New Windows Install?
    ... would regain the references to the installed software. ... If you cannot use the restore points with a new install, ... I'll probably inspect into the restore points to see if the registry files ...
    (microsoft.public.windowsxp.general)