Need to get list of Apps both installed and available/published - 3 days research - Nothing!!
From: Chris (benatar_at_gmail.com)
Date: 10/27/04
- Next message: Sales_at_dealercomms.co.uk: "Writing to a com port VBS"
- Previous message: Ed Stuart: "VB script skelleton"
- Next in thread: Torgeir Bakken \(MVP\): "Re: Need to get list of Apps both installed and available/published - 3 days research - Nothing!!"
- Reply: Torgeir Bakken \(MVP\): "Re: Need to get list of Apps both installed and available/published - 3 days research - Nothing!!"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Sales_at_dealercomms.co.uk: "Writing to a com port VBS"
- Previous message: Ed Stuart: "VB script skelleton"
- Next in thread: Torgeir Bakken \(MVP\): "Re: Need to get list of Apps both installed and available/published - 3 days research - Nothing!!"
- Reply: Torgeir Bakken \(MVP\): "Re: Need to get list of Apps both installed and available/published - 3 days research - Nothing!!"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|