Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add remove programs

Status
Not open for further replies.

Keith0

Technical User
Nov 19, 2004
4
0
0
GB
Hi,
I’m hoping someone can inform me please. What it is I found this script on the MS web site and it currently lists everything in the programs folder. What I want it to do is list everything that is held in the Add Remove programs folder. You know the one when you go to Control Panel – Add Remove programs.

I know it has something to do with the &H2& hexi no. but I don’t know which one represents the Add Remove Programs folder.

If anyone can point me in the right direction or inform me of the correct hexi number it would be great. I'm trying to achieve the same results as the command swlist does in UNIX.
Here is the code:

Const LOCAL_APPLICATION_DATA = &H2&

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(LOCAL_APPLICATION_DATA)
Set objFolderItem = objFolder.Self
Wscript.Echo objFolderItem.Path

Set colItems = objFolder.Items
For Each objItem in colItems
Wscript.Echo objItem.Name
Next

Thanks
Keith
 
I am not sure of exactly how to call the exact list but I can tell you that all of the add/remove programs list is stored in the registry in subfolders beneath HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall. You should be able to run through the entries in this list using VB to generate your own add/remove list via a dialog box or command line.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top