DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: how to use alias / cmd lock pc  (Read 8,366 times)

beethoven

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 46
how to use alias / cmd lock pc
« on: August 20, 2006, 04:44 AM »
I would like to use FA to activate a screensaver on command (when I leave my pc) and have this screensaver password protect my pc.
Noticing in FA  under alias a cmd function that allows for the activation of the screensaver and also a function to lock pc. Can someone please tell me
a) what exactly happens when I use : lock PC | c:\windows\nircmd.exe lockws. I am a bit too scared to test it not knowing if I can unlock it again.
b) assuming that this allows me to lock my pc, how to combine this with my screensaver command and where I would have to set up the lock and unlock commands.

  8)

Babis

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 84
Re: how to use alias / cmd lock pc
« Reply #1 on: August 30, 2006, 06:40 AM »
The best way to lock pc is to create a shortcut for:

Code
%windir%\system32\rundll32.exe user32.dll,LockWorkStation
then place the shortcut in "My Documents" folder or wherever you like and name it somth easy to remember, such as "lock pc" and finally launch FARR and type lock pc.

nontroppo

  • spinning top
  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 649
Re: how to use alias / cmd lock pc
« Reply #2 on: September 04, 2006, 11:27 AM »
a) what exactly happens when I use : lock PC | nircmd.exe lockws. I am a bit too scared to test it not knowing if I can unlock it again.

Don't be scared! ;) All it does is go to the login screen where you have to type your password — it is a standard windows thing nothing custom. You can get nircmd to ask a question first; for example:

Code
reboot | c:\windows\nircmd.exe qboxcom "Do you want to lock your workstation?" "question" lockws 

b) assuming that this allows me to lock my pc, how to combine this with my screensaver command and where I would have to set up the lock and unlock commands.

You don't need both, just get nircmd to run your screensaver (after configuring it to ask password) and the screensaver will ask for your password, so:

Code
screensaver | c:\windows\nircmd.exe screensaver

is all you need...

Original address: https://www.donationcoder.com/forum/index.php?topic=4889.0