Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sc3
Engaged Sweeper II

Hey all, I'd like to create a report to compare the currently scanned "DesignCapacity", to a battery's current max capacity. I can't seem to find any other capacity related fields in the report builder, is there anything that reads the current capacity in any way? MaxBatteryError exists, but I'm afraid I don't understand what it's figures relate to, it doesn't seem to be percentage, and I can't find any details as to what it actually means.

I see some older posts stating having to run scripts on devices to inject such information into the registry so it can be scanned by LS, is this currently the only way of doing it? These were 5/6 years ago, so perhaps I'm missing something.

Cheers!

5 REPLIES 5
Obi_1_Cinobi
Lansweeper Tech Support
Lansweeper Tech Support

Hello there!

According to our database documentation:

MaxBatteryError: Difference between the highest estimated amount of energy left in the battery and the current amount reported by the battery. The data is pulled from the Win32_PortableBattery WMI class. More info on this class can be found here: http://msdn.microsoft.com/en-us/library/aa394357%28v=VS.85%29.aspx

How to access our database documentation: https://community.lansweeper.com/t5/reporting/access-lansweeper-database-documentation/ta-p/64481

With regards to running scripts to inject the data and making it scannable, this is indeed a workaround that is still valid:

sc3
Engaged Sweeper II

Don't worry, figured out my own problem!

Bad timing, essentially - whilst I was fiddling about with the report and rescans to get it all to work, I was also looking at the Cloud portal and attempted to re-sync the asset I was testing with to pull the data through. I can't say why, but this seemed to clear the newly appeared registry keys from Scanned Info, and such when I tested the report, it did not work. Rescanning the asset again pulled said info back, and the report worked, I was able to build on it from there. My bad!

Obi_1_Cinobi
Lansweeper Tech Support
Lansweeper Tech Support

Hello there!

Great to hear that you were able to get this to work! 😎

sc3
Engaged Sweeper II

Thanks Obi Wan,

Concluded that MaxBatteryError doesn't quite fit the bill, so landed on custom reg scanning instead. Testing only on one device currently, but I've successfully injected the required info into the registry of the device, and added custom scanning within Lansweeper to pick it up. I can see said info in Lansweeper under Config > Scanned Info > Registry Keys, so we're all good there.

My only problem now is actually generating a report. I'm frankly useless when it comes to building SQL queries, would you be able to lend a hand?

I've tried to patch together a few from other community posts surrounding custom registry key/value reports, and they all 'run' successfully with no errors, but they'll never pick up the info I call for.

I attempted to use and amend the query from here: https://www.lansweeper.com/resources/report/operating-system/custom-registry-key-audit/

...and got nothing, amending the path and value as required.

Here are the paths and values I'm after:

2025-07-31 14_27_31-Custom Scanning _ Scanning — Mozilla Firefox.png

Any ideas? Thanks in advance!

 
DonMario73
Champion Sweeper II

Hi, would you mind sharing the script that injects those values into the registry keys?

Regards

Product Discussions

Share feedback, exchange ideas and find answers to Lansweeper product questions.

New to Lansweeper?

Try Lansweeper For Free

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

Try Now