(imported topic written by aquasport)
The script below works fine, except when it’s run on the server directly I get a full list of applications and version number. When it run as a fixlet I only get half of the information. why?
Const strFolder = “C:\hcl_objects”
Dim oFSO,objOutputFile,sysfile
Set filesys = CreateObject(“Scripting.FileSystemObject”)
if filesys.FileExists(“C:\hcl_objects\Installed_Apps_Vers.txt”) Then
filesys.DeleteFile("C:\hcl_objects\Installed_Apps_Vers.txt")
End If
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objOutputFile = objFSO.CreateTextFile(“C:\hcl_objects\Installed_Apps_Vers.txt”)
Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE
strComputer = “.”
strKey = “SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall”
strEntry1a = “DisplayName”
strEntry1b = “DisplayVersion”
strEntry3 = “VersionMajor”
strEntry4 = “VersionMinor”
Set objReg = GetObject(“winmgmts://” & strComputer & “/root/default:StdRegProv”)
objReg.EnumKey HKLM, strKey, arrSubkeys
For Each strSubkey In arrSubkeys
intRet1 = objReg.GetStringValue(HKLM, strKey & strSubkey, strEntry1a, strValue1)
intRet2 = objReg.GetStringValue(HKLM, strKey & strSubkey, strEntry1b, strValue2)
If strValue2 <> “” Then
objOutputFile.Writeline strValue1 & "|" & strValue2
End If
Next