Automatically lock screen on lid close in Windows 7

I believe you can change some registry settings to have the PC lock when you shut the lid:

  1. Launch registry (start > regedit)
  2. Local the following: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\Power
  3. Right Click > New > DWORD (32 bits)
  4. Rename it to AwayModeEnabled
  5. Select AwayModeEnabled > Right Click > Change value to 1 (hexadecimal)
  6. Go to Power Options and change the lid close action to Sleep.

This should have 'tricked' the OS into locking the PC when the lid is closed (rather than putting this to sleep).

Please backup your registry before making any changes just in case you change the wrong thing.