cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
zammo
Engaged Sweeper
Hello everyone.

Sorry in advance if this is a question with a silly question!

I work for a school with ~600 workstations and laptops. Lansweeper has so far proved to be brilliant in helping track these as they are moved, re-installed etc. However I believe there are two reasons I need to be able to feed info into LanSweeper in a way not natively supported by the software:

1) Each laptop and desktop has a barcode label. Is there a way we can enter the barcode label when we build the machine, and lansweeper pick up on that and enter it into the correct field? We are quite confident writing software so could have the barcode generated as a reg key, txt file, environmental variable etc.

2) laptops are frequently assigned to new users. Again, is there a way to set this attribute on the laptop in question, and Lansweeper to pick it up? The only way I can see to change user is to log in to the lansweeper console and use the relations, which does not work well for our scenario.

I understand there are field in lansweeper for both of these requirments, however if they are protected in some way I am happy to use the custom fields

Surely there is some way to populate these custom fields from outside the lansweeper console?

Thanks

Martin
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
Within Lansweeper, custom fields can't be filled automatically. However, you could write a script that finds out the barcode and computer name of the computer it is running on, opens a connection to your Lansweeper database and updates the relevant fields directly. For example the following query would update the Barcode field on an Asset based on the domain and assetname:

UPDATE tblAssetCustom SET Barcode='000123456' WHERE AssetID IN (SELECT AssetID FROM tblAssets WHERE Domain='yourdomain' AND Assetname like 'example-pc001')


We recommend that you perform a database backup before testing such a script on your Lansweeper installation.

View solution in original post

1 REPLY 1
Daniel_B
Lansweeper Alumni
Within Lansweeper, custom fields can't be filled automatically. However, you could write a script that finds out the barcode and computer name of the computer it is running on, opens a connection to your Lansweeper database and updates the relevant fields directly. For example the following query would update the Barcode field on an Asset based on the domain and assetname:

UPDATE tblAssetCustom SET Barcode='000123456' WHERE AssetID IN (SELECT AssetID FROM tblAssets WHERE Domain='yourdomain' AND Assetname like 'example-pc001')


We recommend that you perform a database backup before testing such a script on your Lansweeper installation.