cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cause

This error occurs when a registry scanning report is viewed before a scan has been executed.

After adding a new registry key for custom registry scanning, the required scan data does not yet exist in the database. If you attempt to open the report at this point, Lansweeper cannot populate the report variables and returns the following error:

Must declare the scalar variable "@vn"

Resolution

To resolve the issue, ensure that registry scanning is properly configured and that a scan has been completed before viewing the report.

  1. Configure registry scanning
    Follow the steps in this KB article to correctly set up custom registry scanning:
    https://community.lansweeper.com/t5/scanning-your-network/scan-registry-values-with-custom-registry-...

  2. Rescan the affected Windows computers

    • Go to Assets section in the Lansweeper web console.
    • Select the relevant Windows computers by checking the checkboxes in front of them.
    • Click Rescan to initiate a new scan.
  3. View the registry scan results

    • Navigate to Scanning > File & Registry Scanning.
    • Click Report to view the scan results.

Important note

If you attempt to view the report under Scanning > File & Registry Scanning before rescanning the assets, the error “Must declare the scalar variable '@vn'” will occur.

Was this article helpful? Yes No
No ratings

New to Lansweeper?

Try Lansweeper For Free

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

Try Now
Version history
Last update:
yesterday
Updated by: