→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎05-01-2012 12:57 AM
Solved! Go to Solution.
‎08-17-2017 03:17 PM
Select tblAssets.AssetName,
tblAssets.AssetUnique,
tblAssets.Domain,
tblADusers.Firstname,
tblADusers.Lastname,
FirstKey.Detect,
SecondKey.Download,
ThirdKey.Install
From tblAssets
Left Join (Select tblRegistry.AssetID,
tblRegistry.Regkey,
tblRegistry.Value As Download
From tblRegistry
Where
tblRegistry.Regkey =
'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Download') SecondKey On SecondKey.AssetID = tblAssets.AssetID
Left Join (Select tblRegistry.AssetID,
tblRegistry.Regkey,
tblRegistry.Value As Install
From tblRegistry
Where
tblRegistry.Regkey =
'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install') ThirdKey On ThirdKey.AssetID = tblAssets.AssetID
Left Join (Select tblRegistry.AssetID,
tblRegistry.Regkey,
tblRegistry.Value As Detect
From tblRegistry
Where
tblRegistry.Regkey =
'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Detect') FirstKey On FirstKey.AssetID = tblAssets.AssetID
Left Join tblADusers On tblADusers.Username = tblAssets.Username And
tblADusers.Userdomain = tblAssets.Userdomain
Order By tblAssets.AssetUnique
‎05-03-2012 06:55 PM
TNTreasury wrote:
Thank you. I copy / pasted this code and the report list the computer one time along with the user's first and last name. There are colums for Detect, download and Install, but there are no values.
Do I need to include the tblRegistry ?
‎05-03-2012 09:21 PM
Lansweeper wrote:TNTreasury wrote:
Thank you. I copy / pasted this code and the report list the computer one time along with the user's first and last name. There are colums for Detect, download and Install, but there are no values.
Do I need to include the tblRegistry ?
TblRegistry is already included in the report, through the derived tables. Have values for the registry keys you are after actually been scanned? If not, could you perform a Full Rescan of your machines.
Select tblComputers.Computername, tblComputers.ComputerUnique,[img][/img]
tblComputers.Domain, tblRegistry.Computername As Computername1,
tblRegistry.Regkey, tblRegistry.Lastchanged, tblRegistry.Value,
tblRegistry.Valuename
From tblComputers Inner Join
tblRegistry On tblComputers.Computername = tblRegistry.Computername
‎05-03-2012 03:54 PM
Select tblComputers.Computername, tblComputers.ComputerUnique,
tblComputers.Domain, tblADusers.Firstname, tblADusers.Lastname,
FirstKey.Detect, SecondKey.Download, ThirdKey.Install
From tblComputers Left Join
(Select tblRegistry.Computername, tblRegistry.Regkey, tblRegistry.Value As
Download
From tblRegistry
Where
tblRegistry.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Download')
SecondKey On SecondKey.Computername = tblComputers.Computername Left Join
(Select tblRegistry.Computername, tblRegistry.Regkey, tblRegistry.Value As
Install
From tblRegistry
Where
tblRegistry.Regkey =
'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install') ThirdKey On ThirdKey.Computername = tblComputers.Computername Left Join
(Select tblRegistry.Computername, tblRegistry.Regkey, tblRegistry.Value As
Detect
From tblRegistry
Where tblRegistry.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Detect') FirstKey On FirstKey.Computername =
tblComputers.Computername Left Join
tblADusers On tblADusers.Username = tblComputers.Username And
tblADusers.Userdomain = tblComputers.Userdomain
Order By tblComputers.ComputerUnique
‎05-02-2012 06:08 PM
Select Top 10000 tblComputers.Computername, tblComputers.ComputerUnique,
tblComputers.Domain, tblRegistry.Value As Detect,
tblRegistry1.Value As Download, tblRegistry2.Value As Install
From tblComputers
Inner Join tblRegistry On tblComputers.Computername = tblRegistry.Computername
Inner Join tblRegistry tblRegistry1 On tblComputers.Computername = tblRegistry1.Computername
Inner Join tblRegistry tblRegistry2 On tblComputers.Computername = tblRegistry2.Computername
Where tblRegistry.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Detect'
And tblRegistry1.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Download'
And tblRegistry2.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install'
Where tblRegistry.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Detect'
And tblRegistry1.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Download'
And tblRegistry2.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install'
‎05-02-2012 01:32 PM
‎05-02-2012 01:17 AM
Select Top 10000 tblComputers.Computername, tblComputers.ComputerUnique,
tblComputers.Domain, tblRegistry.Value As Detect,
tblRegistry1.Value As Download, tblRegistry2.Value As Install
From tblComputers
Inner Join tblRegistry On tblComputers.Computername = tblRegistry.Computername
Inner Join tblRegistry tblRegistry1 On tblComputers.Computername = tblRegistry1.Computername
Inner Join tblRegistry tblRegistry2 On tblComputers.Computername = tblRegistry2.Computername
Where tblRegistry.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Detect'
And tblRegistry1.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Download'
And tblRegistry2.Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install'
‎05-01-2012 10:20 AM
‎05-01-2012 05:53 PM
Lansweeper wrote:
Can you post an extract from the results table and your defined registry keys please.
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now