Here is a great tool that automatically locks your PC whenever you are away. Just download the free tool BtProx and installed on your machine.
In order to use this tool make sure that your PC has a built in Bluetooth device or get a Bluetooth dongle. Activate the device by going to Control Panel – Double click Bluetooth icon.
Now run a search till you find your mobile phone (don’t forget to enable Bluetooth on your phone).
Then run BtProx and click search button (,,,,,) to find your phone and select it. Then change the timeout value, any value after which you would like switch of your PC.
BtProx uses the Bluetooth range to lock your PC. It locks Windows upon disconnection of Bluetooth device.
There are various options for advanced users like run a particular application when your PC is locked, etc.
BtProx works on Windows XP, Vista and 7 (Requires .NET 3.5 for XP and Vista)