→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
spgs
Engaged Sweeper II
Report which is next to the registry key shows the correct machines, but I can not get custom report working


Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblRegistry.Regkey,
tblRegistry.Valuename,
tblRegistry.Value,
tblRegistry.Lastchanged
From tblAssets
Inner Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Where tblRegistry.Regkey Like '%MSRS11' And tblAssets.Assettype =
-1
Order By tblAssets.AssetName


I am scanning for value in PatchLevel in key SOFTWARE\Microsoft\Microsoft SQL Server\MSRS11.MSSQLSERVER\Setup

Seb
2 REPLIES 2
David_G
Lansweeper Employee
Lansweeper Employee
When you want to create a custom report for reporting on a registry key you have set up under Scanning\File & Registry Scanning, you will have to make sure that you have rescanned your assets prior to running the report, as otherwise, you will not be able to find potential results for it.

Additionally, we recommend using the report below, we have added a custom registry scanning report below that will search for the registry key you are after (I presume that the registry key and value you have added are correct).

Instructions for adding this report to your Lansweeper installation can be found here. If you are interested in building or modifying reports, we do recommend:
  • Reviewing some SQL tutorials, as the Lansweeper report builder is a standard SQL editor. If you know SQL, you know how to build Lansweeper reports as well. This seems like a good tutorial.
  • Making use of our database dictionary, which explains in great detail what each database table and field stores. More information on the dictionary can be found here.
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,
Case
When SubQuery1.Valuename Is Not Null And SubQuery1.Valuename <>
'' Then 'Yes' Else 'No' End As ValuenameFound,
SubQuery1.Regkey,
SubQuery1.Valuename,
SubQuery1.Value,
SubQuery1.Lastchanged
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\Microsoft\Microsoft SQL Server\MSRS11.MSSQLSERVER\Setup' And
tblRegistry.Valuename = 'PatchLevel') SubQuery1 On SubQuery1.AssetID =
tblAssets.AssetID
Where tblAssetCustom.State = 1 And TsysWaittime.CFGname = 'registry'
Order By tblAssets.Domain,
tblAssets.AssetName

spgs
Engaged Sweeper II
My adjusted version to quickly show if machine has current version (of course one HAS to specify what current means!) is here