cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
zailleh
Engaged Sweeper II
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?
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
Hi,

Indeed the problem is that values with more then 500 chars are not scanned.
If you run the following script in the section database scripts on the page configuration/database script then it will be possible to change the limit to 1000 characters.
ALTER TABLE tblregistry ALTER COLUMN value nvarchar(1000)

View solution in original post

1 REPLY 1
Hemoco
Lansweeper Alumni
Hi,

Indeed the problem is that values with more then 500 chars are not scanned.
If you run the following script in the section database scripts on the page configuration/database script then it will be possible to change the limit to 1000 characters.
ALTER TABLE tblregistry ALTER COLUMN value nvarchar(1000)

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now