Quickly locking your Windows PC

Quickly locking your Windows PC

Rate This
  • Comments 12

lock

Okay, I know you can press Windows Key + L but I really like to have an icon in my taskbar for this little task so every time I install a Windows OS I tend to add this as one of my first tweaks. Why? Well I learnt early on at Microsoft that leaving your PC unlocked when you walk off to get coffee can result in email being sent from your account that can be quite embarrassing :)

Here's how to create a quick lock app on your taskbar

  1. Right click on your deksotp and select New, Shortcut
  2. Paste this text in - rundll32.exe user32.dll,LockWorkStation
  3. Click next and type a name for the shortcut (e.g. Lock)
  4. Click finish
  5. You can right click on your new shortcut and change the icon (there is a lock icon as part of the collection in %SystemRoot%\system32\SHELL32.dll)
  6. Now drag the icon to your taskbar

Done :)

  • The LockWorkStation function was not designed to be called by rundll32. You're actually corrupting the stack.

    http://blogs.msdn.com/oldnewthing/archive/2004/01/15/58973.aspx

  • Isn't windows key + L simpler.

  • Here a few I use on my quick launch bar in addition to locking the computer.

    ** Shutdown **

    Create a new shortcut  and paste the following:

    %windir%\system32\shutdown.exe -s -t 0

    ** Reboot **  (No sarky comments please!

    %windir%\system32\shutdown.exe -r -t 0

  • It would be much more comfortable if the icon (or any clickable area) can be placed at a corner of the screen. This way I just push the mouse to the extreme and click, no need to locate the cursor anymore.

  • aaron - yep, definitely simpler but not always faster when I have the mouse in my hand

  • nice additions Jas. surely that reboot one is just restart after you've installed some new graphics drivers :P

  • raymond - is there a better way?

    Steve

  • Oops, yep meant a restart.

    Bang on, Nvidia drivers and Bios updates always a pain and need a restart.

    I've not had time to source with the Vista ResKit but are there any nice shortcuts for Vista?

    One of my favourite tools on XP has always been robocopy.

    Fab tool which you can use to mirror drives, great for backup purposes...

    robocopy.exe /?  for useful switches..

    Au qualitaire

  • I just saw a great tip on Steve Clayton's blog for quickly locking your Windows PC, so I just had

  • Hey Now Steve,

    Nice to know.

    thx,

    Catto

  • Hah, yes, always lock your PC regardless of how long you're away from it.

    I learned this from a very young age (on NT4) at school. The principle has carried over since then - and folks are often puzzled as to why I'm always locking my PC when I'm no longer paying attention to it. Even my home ones :)

Page 1 of 1 (12 items)