Notification

Icon
Error

.Net 4.5 through 4.8 report - Reg Key scanning based - Reports on versions of .net installed from 4.5 to 4.8

Posted: Wednesday, June 12, 2019 6:30:05 PM(UTC)
Noobmode

Noobmode

Member Original PosterPosts: 16
0
Like
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblRegistry.Regkey,
tblRegistry.Valuename,
tblRegistry.Value As Build,
Version = Case tblRegistry.Value
When '378389' Then '4.5'
When '378675' Then '4.5.1'
When '378758' Then '4.5.1'
When '379893' Then '4.5.2'
When '393295' Then '4.6'
When '393297' Then '4.6'
When '394254' Then '4.6.1'
When '394271' Then '4.6.1'
When '394802' Then '4.6.2'
When '394806' Then '4.6.2'
When '460798' Then '4.7'
When '460805' Then '4.7'
When '461308' Then '4.7.1'
When '461310' Then '4.7.1'
When '461808' Then '4.7.2'
When '461814' Then '4.7.2'
When '528040' Then '4.8'
When '528049' Then '4.8'
Else '?'
End
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Where
tblRegistry.Regkey =
'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' And
tblRegistry.Valuename = 'release' And tblAssetCustom.State = 1
Order By Build,
tblAssets.AssetName

--Dot Net Framework versions and dependencies
--Used to reference reg keys to Version numbers
--https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies
--https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed
nekrosoft13
#1nekrosoft13 Member Posts: 15  
posted: 8/4/2019 4:17:53 AM(UTC)
getting this error

There was an error parsing the query. [ Token line number = 1,Token line offset = 311,Token in error = = ]
Martin Schulz
#2Martin Schulz Member Posts: 1  
posted: 12/11/2019 11:55:24 AM(UTC)
The code above works for SQL Express databases. If you use SQL Compact, you can use the following.

Select Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.AssetName,
tblAssets.Domain,
Case tblRegistry.Value
When '378389' Then '4.5'
When '378675' Then '4.5.1'
When '378758' Then '4.5.1'
When '379893' Then '4.5.2'
When '393295' Then '4.6'
When '393297' Then '4.6'
When '394254' Then '4.6.1'
When '394271' Then '4.6.1'
When '394802' Then '4.6.2'
When '394806' Then '4.6.2'
When '460798' Then '4.7'
When '460805' Then '4.7'
When '461308' Then '4.7.1'
When '461310' Then '4.7.1'
When '461808' Then '4.7.2'
When '461814' Then '4.7.2'
When '528040' Then '4.8'
When '528049' Then '4.8'
Else '?'
End As Version,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblRegistry On tblAssets.AssetID = tblRegistry.AssetID
Where
tblRegistry.Regkey =
'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' And
tblRegistry.Valuename = 'release' And tblAssetCustom.State = 1
Order By tblRegistry.Value,
tblAssets.AssetName

Active Discussions

Lansweeper Last used system of users in a specific OU
by  chriscornelis   Go to last post Go to first unread
Last post: Yesterday at 11:11:35 AM(UTC)
Lansweeper Trying to display different versions of software
by  TimHolmes1973  
Go to last post Go to first unread
Last post: 10/28/2020 8:54:04 PM(UTC)
Lansweeper Switch & Port reports - SNMPInfo tables missing info
by  Maxlieb   Go to last post Go to first unread
Last post: 10/28/2020 1:02:24 PM(UTC)
Lansweeper Last Patch Date
by  Dan S   Go to last post Go to first unread
Last post: 10/26/2020 2:27:47 PM(UTC)
Lansweeper Webcam report, the wrong way
by  TimHolmes1973  
Go to last post Go to first unread
Last post: 10/23/2020 4:38:45 PM(UTC)
Lansweeper zerologin posted report
by  hanslepire   Go to last post Go to first unread
Last post: 10/23/2020 8:50:59 AM(UTC)
Lansweeper Need help finishing a report for Failed Logons
by  Helpdesk15  
Go to last post Go to first unread
Last post: 10/20/2020 3:10:33 PM(UTC)