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 Close ticket failed
by  JohnnyL   Go to last post Go to first unread
Last post: Yesterday at 6:51:21 PM(UTC)
Lansweeper SNMP Asset dont work
by  implenia  
Go to last post Go to first unread
Last post: Yesterday at 3:44:02 PM(UTC)
Lansweeper Remote IT Asset MGMT during the Covid-19 Crisis
by  Esben.D   Go to last post Go to first unread
Last post: Yesterday at 1:14:27 PM(UTC)
Lansweeper Unable to transfer user's data prior to removal
by  jbruyet  
Go to last post Go to first unread
Last post: 4/1/2020 11:40:35 PM(UTC)
Lansweeper Scanning IP Range Subnet
by  ethanthekiwi   Go to last post Go to first unread
Last post: 4/1/2020 9:16:35 PM(UTC)
Lansweeper Toner Levels Missing
by  brodiemac-too  
Go to last post Go to first unread
Last post: 4/1/2020 8:42:19 PM(UTC)
Lansweeper WLC 5508 question
by  Faktotum   Go to last post Go to first unread
Last post: 4/1/2020 1:10:23 PM(UTC)
Lansweeper SNMPv3 global credentials ?
by  JeremySG  
Go to last post Go to first unread
Last post: 4/1/2020 9:01:16 AM(UTC)