Thanks Glenn but I'm quite new to kix scripting, are you able to show me how I can fit this into my code? Thanks

 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)
If @ERROR = 0
	$SoftwareName=READVALUE($uninstallkey+$package,"Displayname")
	If $SoftwareName<>""
		If InStr($SoftwareName,"Security Update For")=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
	Goto PackageLoop
EndIf

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


Edited by User1234 (2015-11-03 03:13 PM)