Just tried that (see code below) the csv gets created but doesn't data in it, the csv is blank.

 Code:
CALL "\\hbs002592\c$\Netlogon\UDF_Global.kix"
$UpdatesScripts_Loc = "\\hbs002592\c$\Netlogon\"
$LogonLogs = "\\hbs002592\c$\Netlogon\"

$uninstallkey="HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\"
$PackageList=Chr(34)+"PC"+Chr(34)+","+CHR(34)+"Software_Name"+CHR(34)+","+CHR(34)+"Software_Version"+Chr(34)+","+Chr(34)+"Software_Publisher"+Chr(34)

$Index=0
:PackageLoop
$package=ENUMKEY($uninstallkey, $Index)
While Not @ERROR = 0
	$SoftwareName=READVALUE($uninstallkey+$package,"Displayname")
	If $SoftwareName<>""
		If InStr($SoftwareName,"Security Update For")=0 AND InStr($SoftwareName,"Update for Windows XP")=0 AND InStr($SoftwareName,"Windows XP Hotfix")=0 AND InStr($SoftwareName,"Hotfix for Windows XP")=0 AND InStr($SoftwareName,"Windows 2000 Hotfix")=0 AND InStr($SoftwareName,"Update for Windows 7")=0 AND InStr($SoftwareName,"Windows 7 Hotfix")=0 AND InStr($SoftwareName,"Hotfix for Windows 7")=0
			$SoftwareVersion="N/A"
			$SoftwareVersion=READVALUE($uninstallkey+$package,"DisplayVersion")
			If $SoftwareVersion=""
				$SoftwareVersion="N/A"
			EndIf
			$Publisher="N/A"
			$Publisher=READVALUE($uninstallkey+$package,"Publisher")
			If $Publisher=""
				$Publisher="N/A"
			EndIf
			$PackageList = $PackageList + @CRLF +CHR(34)+ @WKSTA +CHR(34)+ "," +CHR(34)+ $SoftwareName +CHR(34)+ "," +CHR(34)+ $SoftwareVersion+CHR(34)+","+Chr(34)+$Publisher+Chr(34)
		ENDIF
	EndIf
	$Index=$Index+1
	$package=ENUMKEY($uninstallkey, $Index)
	EndIf
Loop

LogtoFile("ForceOverwrite",$LogonLogs+"Software_Inventory\"+@WKSTA+".csv",$PackageList)


Edited by User1234 (2015-11-03 04:44 PM)