Assuming that you are on a Windows based machine, you can always lock your system by pressing Window+L keys. But what if you need to lock your computer from some distance.
Suppose you are out of your office and suddenly remembered that you forgot to lock your machine, what will you do? You will go back to lock it? What if I tell you that you can lock your computer remotely using any bluetooth enabled device.
BtProx (Bluetooth Proximity Lock) is a small software that locks any Windows computer if it gets disconnected from the same. When you come back in the range, the computer is unlocked again.
You can also specify any command that it should run when it locks the computer and when it unlocks the computer.
Download BtProx from this page.