> Where in the registry could I find this info? Could I find it in the same
> place in NT4, Win 9x, or XP? Thanks in advance.
If you mean the list under Add/Remove Programs:
Here is a batch file that will list all sw under
Add/Remove Programs to a file (code can also be found at
(http://www.fpschultze.de/bsh.htm#a18 ):
@Echo Off
:: Line below might wrap
Start /Wait Regedit /E %TEMP%.\Tmp
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
:: Next line
Find "DisplayName" < %TEMP%.\Tmp |
Find /V "QuietDisplayName" >%TEMP%.\ARProg.txt
Del %TEMP%.\Tmp
Notepad >%TEMP%.\ARProg.txt
For Win2k and WinXP (and NT 4.0/Win9x if you have installed WMI):
sComputer = "." ' use "." for local computer
MsgBox InstalledApplications(sComputer)
Function InstalledApplications(node)
Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE
Set oRegistry = _
GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
& node & "/root/default:StdRegProv")
sBaseKey = _
"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
iRC = oRegistry.EnumKey(HKLM, sBaseKey, arSubKeys)
For Each sKey In arSubKeys
iRC = oRegistry.GetStringValue( _
HKLM, sBaseKey & sKey, "DisplayName", sValue)
If iRC <> 0 Then
oRegistry.GetStringValue _
HKLM, sBaseKey & sKey, "QuietDisplayName", sValue
End If
If sValue <> "" Then
InstalledApplications = _
InstalledApplications & sValue & vbCrLf
End If
Next
End Function
--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter