Tracking Laptop Usage in a 1:1 environment aka "Who stole the laptop?"

<![CDATA[
Let me start this post by ensuring you that I am on a limited budget trying to effectively manage a 1:1.  I am sure there are paid alternatives, and possibly better free ones, that accomplishes this in other ways.  But it works!
Students lose laptops, forget where they put them, have them stolen, leave them on the bus for a 3rd grader to find (kept it for 2 weeks before his parents found it) and so forth.  They usually come crying to us a few days (sometimes weeks) later and don’t have a clue where it is.  How can we find it?
I have taken a tracking approach to simply let the laptop tell me where its is, who is using it, and what wifi it is on.  I do this through a logon batch script that simply sends a email to a tracking email account on each logon.  Yep, that is a lot of emails, but it is going to an account I only logon to when I need to find one.  I use gmail filters to put them in nice little folders by class, staff…
I use SendEmail (written by Brandon Zehm http://caspian.dotconf.net/)  This is in a folder on the C drive of my student laptops, and I added a logon script to execute logon.bat each logon.  I could do it on power on, timed, whenever.  Obviously task scheduler is used to execute the task as system.  All the information on how to use his code is in a text file in his download.
To make my batch file work simply replace:

  1. gmailsmtp@gmail.com with your gmail account it is coming from in SMTP
  2. gmpassword with the password for the account above.  Assuming GMAIL SMTP
  3. trackingemail@gmail.com with the email you want to be receiving these notices.
  4. @yourdomain.com with your actual domain.  It will then be sending the email from the user email address (in the from field.)

I am using netsh wlan show interface > c:\users\%username%\profile.txt to dump information to attach.  You could do ipconfig /all > profile.txt in the section for non-wifi users to try and find where it is plugged in as well.  I found this to not be very useful, but you might.
The end result.  If a student leaves his laptop lying around.  Someone else could pick it up and take it home.  But it will be of no use since they have no logon account on that laptop.  They would have to logon to it, at school, to accomplish that.  Then they are the last logon to the laptop.  I have had a student drive in at midnight, sit in the parking lot, and logon.  Yes, that has happened.  The point is that to make it usable, they have to logon.  And  I instantly know who did it.  If I am tracking a particular laptop I can have a gmail forwarded to me the instant it is used.
I have also had a student clean one all up and sell it to another student (like I didn’t have the motherboard serial numbers) and think I wouldn’t notice.  Is this worth the time?  It certainly is to the student that doesn’t want to pay for the lost laptop!


ECHO OFF
REM Who is logging on?
set str=%username%
REM What class is the user (for GMail filtering into folders)
set str=%str:~0,2%
REM Dump the current WIFI SSID information into a file
netsh wlan show interface > c:\users\%username%\profile.txt
REM Student account start with the grad year (last 2) and if this is true…it is a student
If %str% LSS 100 goto studentlogons
REM If a non-student account is logging on, it is an “other” logon.
:otherlogons
C:\sendmail\sendEmail.exe -f %username%@yourdomain.com -t trackingemail@gmail.com -u %username% just logged to %computername% -m %computername% was logged on by User:%username% at %time% on %date% -a c:\users\%username%\profile.txt -s smtp.gmail.com:587 -xu gmailsmtp@gmail.com -xp gmpassword -o tls=yes
REM  It sent, goto end
If %errorlevel% == 0 goto end
REM If the laptop is not on WIFI, it errors, so send it without WIFI SSID Info
C:\sendmail\sendEmail.exe -f %username%@yourdomain.com -t trackingemail@gmail.com -u %username% just logged to %computername% -m %computername% was logged on by User:%username% at %time% on %date% -s smtp.gmail.com:587 -xu gmailsmtp@gmail.com -xp gmpassword -o tls=yes
goto end
:studentlogons
C:\sendmail\sendEmail.exe -f %username%@yourdomain.com -t trackingemail@gmail.com -u %username% just logged to %computername% Class:%str% -m %computername% was logged on by User:%username% at %time% on %date% -a c:\users\%username%\profile.txt -s smtp.gmail.com:587 -xu gmailsmtp@gmail.com -xp gmpassword -o tls=yes
REM  It sent, goto end
If %errorlevel% == 0 goto end
REM If the laptop is not on WIFI, it errors, so send it without WIFI SSID Info
C:\sendmail\sendEmail.exe -f %username%@yourdomain.com -t trackingemail@gmail.com -u %username% just logged to %computername% Class:%str% -m %computername% was logged on by User:%username% at %time% on %date% -s smtp.gmail.com:587 -xu gmailsmtp@gmail.com -xp gmpassword -o tls=yes
goto end
:end]]>

Leave a Reply

Your email address will not be published. Required fields are marked *