HI, Does anyone knows how to output the data to a file in the script below? I tried to find info on this but so far no luck. Thanks.
————————————-
Option Explicit
Dim strComputer, strKey, strSubKey
Dim objRegistry
Dim arrSubKeys()
Dim strDisplayName, strDisplayVersion, strInstallLocation
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = “.”
strKey = “SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall”
‘*
‘* CALLOUT A
‘*
Set objRegistry = GetObject(“winmgmts:” & _
“{impersonationLevel=Impersonate}!\\” & _
strComputer & “\root\default:StdRegProv”)
‘*
‘* CALLOUT B
‘*
objRegistry.EnumKey HKEY_LOCAL_MACHINE, strKey, arrSubKeys
‘*
‘* CALLOUT C
‘*
On Error Resume Next
For Each strSubKey In arrSubKeys
objRegistry.GetStringValue HKEY_LOCAL_MACHINE, _
strKey & “\” & strSubKey, _
“DisplayName”, _
strDisplayName
objRegistry.GetStringValue HKEY_LOCAL_MACHINE, _
strKey & “\” & strSubKey, _
“DisplayVersion”, _
strDisplayVersion
objRegistry.GetStringValue HKEY_LOCAL_MACHINE, _
strKey & “\” & strSubKey, _
“InstallLocation”, _
strInstallLocation
WScript.Echo strSubKey
WScript.Echo String(Len(strSubKey), “-“)
WScript.Echo “Display name: ” & strDisplayName
WScript.Echo “Display version: ” & strDisplayVersion
WScript.Echo “Install location: ” & strInstallLocation
WScript.Echo
strDisplayName = vbEmpty
strDisplayVersion = vbEmpty
strInstallLocation = vbEmpty
Next