Notification

Icon
Error

Report Showing custom registry keys scanned

Posted: Monday, January 6, 2020 3:35:42 PM(UTC)
Liamsy11

Liamsy11

Member Original PosterPosts: 7
0
Like
Hi,

I need a report which shows all Windows PC's along with their custom registry keys scanned in a report.

For example, I want to be able to show Asset name, Software Version (Symantec Endpoint Protection) and two different registry keys which I have added to the registry key scanning. I can see the report for each of these keys individually using the report button in scanning but i would like all the above information to be in one report.

The 2 registry keys are

SOFTWARE\Symantec\Symantec Endpoint Protection\CurrentVersion\Public-Opstate Reg Value 'LatestVirusDefsDate'

SOFTWARE\Symantec\Symantec Endpoint Protection\CurrentVersion\Public-Opstate Reg Value 'LatestVirusDefsRevision'

I have no expertise when it comes to SQL queries and would really appreciate some help here. I have tried multiple times to get this to work but to no avail.

Many thanks,

Liam
impagian
#1impagian Member Posts: 2  
posted: 1/23/2020 4:01:34 PM(UTC)
We did it like this:


Code:

Select Top 1000000 tsysOS.Image As icon,
  tblAssets.AssetID,
  tblAssets.AssetName,
  tblAssets.Domain,
  tblAssets.Username,
  tblAssets.Userdomain,
  tblAssets.IPAddress,
  tblAssets.Firstseen,
  tblAssets.Lastseen,
  tblAssets.Lasttried,
  TsysLastscan.Lasttime As LastRegistryScan,
  Case
    When TsysLastscan.Lasttime < GetDate() - 1 Then
      'Last registry scan more than 24 hours ago! Scanned registry information may not be up-to-date. Try rescanning this machine.'
  End As Comment,
  SubQuery1.Value As WindowsOnlineUpdate,
  SubQuery2.Value As WindowsOnlineUpdateUser,
  SubQuery3.Value As WindowsOnlineUpdateDate,
  SubQuery4.Value As DellOnlineUpdate,
  SubQuery5.Value As DellOnlineUpdateDone,
  SubQuery6.Value As DellOnlineUpdateDone,
  SubQuery7.Value As OfficeVersion
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 tblRegistry.AssetID,
        tblRegistry.Regkey,
        tblRegistry.Valuename,
        tblRegistry.Value,
        tblRegistry.Lastchanged
      From tblRegistry
      Where tblRegistry.Regkey Like '%SOFTWARE\CompanyName' And
        tblRegistry.Valuename = 'WindowsOnlineUpdate') SubQuery1 On
    SubQuery1.AssetID = tblAssets.AssetID
  Left Join (Select Top 1000000 tblRegistry.AssetID,
        tblRegistry.Regkey,
        tblRegistry.Valuename,
        tblRegistry.Value,
        tblRegistry.Lastchanged
      From tblRegistry
      Where tblRegistry.Regkey Like '%SOFTWARE\CompanyName' And
        tblRegistry.Valuename = 'WindowsOnlineUpdateUser') SubQuery2 On
    SubQuery2.AssetID = tblAssets.AssetID
  Left Join (Select Top 1000000 tblRegistry.AssetID,
        tblRegistry.Regkey,
        tblRegistry.Valuename,
        tblRegistry.Value,
        tblRegistry.Lastchanged
      From tblRegistry
      Where tblRegistry.Regkey Like '%SOFTWARE\CompanyName' And
        tblRegistry.Valuename = 'WindowsOnlineUpdateDate') SubQuery3 On
    SubQuery3.AssetID = tblAssets.AssetID
	Left Join (Select Top 1000000 tblRegistry.AssetID,
        tblRegistry.Regkey,
        tblRegistry.Valuename,
        tblRegistry.Value,
        tblRegistry.Lastchanged
      From tblRegistry
      Where tblRegistry.Regkey Like '%SOFTWARE\CompanyName' And
        tblRegistry.Valuename = 'DellOnlineUpdate') SubQuery4 On
    SubQuery4.AssetID = tblAssets.AssetID
  Left Join (Select Top 1000000 tblRegistry.AssetID,
        tblRegistry.Regkey,
        tblRegistry.Valuename,
        tblRegistry.Value,
        tblRegistry.Lastchanged
      From tblRegistry
      Where tblRegistry.Regkey Like '%SOFTWARE\CompanyName' And
        tblRegistry.Valuename = 'DellOnlineUpdateUser') SubQuery5 On
    SubQuery5.AssetID = tblAssets.AssetID
  Left Join (Select Top 1000000 tblRegistry.AssetID,
        tblRegistry.Regkey,
        tblRegistry.Valuename,
        tblRegistry.Value,
        tblRegistry.Lastchanged
      From tblRegistry
      Where tblRegistry.Regkey Like '%SOFTWARE\CompanyName' And
        tblRegistry.Valuename = 'DellOnlineUpdateDate') SubQuery6 On
    SubQuery6.AssetID = tblAssets.AssetID
	Left Join (Select Top 1000000 tblRegistry.AssetID,
        tblRegistry.Regkey,
        tblRegistry.Valuename,
        tblRegistry.Value,
        tblRegistry.Lastchanged
      From tblRegistry
      Where tblRegistry.Regkey Like '%SOFTWARE\CompanyName' And
        tblRegistry.Valuename = 'OfficeVersion') SubQuery7 On
    SubQuery7.AssetID = tblAssets.AssetID
Where tblAssetCustom.State = 1 And TsysWaittime.CFGname = 'registry'
Order By tblAssets.Domain,
  tblAssets.AssetName

Active Discussions

Lansweeper Report on clients with no LSAgent
by  RobertB   Go to last post Go to first unread
Last post: Yesterday at 6:55:32 PM(UTC)
Lansweeper Lansweeper report to match computer name
by  RC62N   Go to last post Go to first unread
Last post: 2/19/2020 5:02:27 PM(UTC)
Lansweeper Distinct user logins per PC
by  Bruce Garoutte   Go to last post Go to first unread
Last post: 2/17/2020 6:36:29 PM(UTC)
Lansweeper Software version report issue
by  RC62N  
Go to last post Go to first unread
Last post: 2/17/2020 4:07:20 PM(UTC)
Lansweeper Patch Tuesday - Exclude Win 2008 & Win7
by  doone128   Go to last post Go to first unread
Last post: 2/17/2020 1:34:36 PM(UTC)
Lansweeper Performance statistics combined into one report
by  djs1789  
Go to last post Go to first unread
Last post: 2/15/2020 1:50:32 AM(UTC)