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 gkittelson 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 with VBScript

Status
Not open for further replies.

krochrokt1

Technical User
Dec 3, 2001
2
US
How can I use VBScript to search the registry for the display name values in the add/remove programs key. I am trying to display the add/remove programs list for inventory purposes. I don't have SMS and don't want to use a third party program in I can get away with it.
 
I can find the keys. The problem I am having lies in creating a script to parse the registry and retrieve the display name value from each key and then display it to the technician. The script will be used as part of a scheduled audit of the PC for unauthorized software.
 
Unfortunately, enumerating keys/values is not facilitated thru VBS, it was designed for simple read/write/delete access to the registry.

That said, the functionality you desire can still be achieved. Use Regedit to export the key to a text file.

Set oShell = CreateObject("WScript.Shell")
oShell.Run "COMMAND /C REGEDIT /E C:\temp.txt HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall"

Now, parse C:\temp.txt for the DisplayName values or use Find to export the lines with DisplayName.

oShell.Run "COMMAND /C FIND ""DisplayName"" C:\temp.txt >C:\temp2.txt"

Now, C:\temp2.txt contains a list of all the DisplayName values. Use the FSO to parse this file and present the list to your user. Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top