Hi Everyone,
I'm hoping to get some help with this issue I'm having. I'm trying to scan the below key:
Key: HKLM\SYSTEM\CurrentControlSet\Control\Session Manager
Value: PendingFileRenameOperations
Type: REG_MULTI_SZ
The issue I'm having is that no results are being found even when I know that the key & value exist.
My troubleshooting has isolated the problem down to the value being too long; the data type in the database is varchar(500) -- This indicates that Lansweeper is not truncating the value to 500 chars and thus the data is failing to be saved to the database.
I have confirmed this by modifying the value to be just over 500 chars and then just below 500 chars. When the value is over 500 chars, it doesn't display; when it's below 500 chars it displays.
Seeing what happens on the database side:
/****** Script for SelectTopNRows command from SSMS ******/
SELECT TOP 1000 [RegistryID]
,[AssetID]
,[Regkey]
,[Valuename]
,[Value]
,[Lastchanged]
FROM [lansweeperdb].[dbo].[tblRegistry]
Where ValueName LIKE '%pending%' and AssetID = 164
When reg value is over 500 chars: 0 rows returned
When reg value is under 500 chars: 1 row returned
Would it be possible to have Lansweeper truncate scanned values before attempting to insert them in the database?