‎02-02-2020 09:33 PM
‎02-03-2020 12:14 AM
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Username,
tblAssetCustom.Model,
tblAssets.Version,
tblAssets.IPAddress,
Case SubQuery1.Found
When 1 Then 'Yes'
Else 'No'
End As FileFound,
SubQuery1.FileVersion As [Driver Version],
SubQuery1.Filesize,
SubQuery1.PathSearched,
SubQuery1.LastAccessed,
TsysLastscan.Lasttime As LastFileScan,
tblAssets.Lastseen,
Case
When SubQuery1.FileVersion Like '20.70.13.2' Then '#d4f4be'
Else '#ffadad'
End As backgroundcolor,
Case
When TsysLastscan.Lasttime < GetDate() - 1 Then
'Last file scan more than 24 hours ago! Scanned info may not be up-to-date.'
End As Comment
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join TsysLastscan On tblAssets.AssetID = TsysLastscan.AssetID
Inner Join TsysWaittime On TsysWaittime.CFGCode = TsysLastscan.CFGcode
Left Join (Select Top 1000000 tblFileVersions.AssetID,
tblFileVersions.FilePathfull As PathSearched,
tblFileVersions.Found,
tblFileVersions.FileVersion,
tblFileVersions.CompanyName,
tblFileVersions.Filesize,
tblFileVersions.Lastchanged,
tblFileVersions.CreationDate,
tblFileVersions.LastAccessed,
tblFileVersions.LastModified
From tblFileVersions
Where tblFileVersions.FilePathfull Like '%NETwtw06.sys%') SubQuery1 On
SubQuery1.AssetID = tblAssets.AssetID
Inner Join tblBIOS On tblAssets.AssetID = tblBIOS.AssetID
Where tblAssetCustom.Model Like '%PORTEGE X20%' And tblAssetCustom.State = 1 And
TsysWaittime.CFGname = 'files'
Order By FileFound Desc,
[Driver Version],
tblAssets.AssetName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now