I bet it is and I have done a search but found nothing. Anyone do
this? Seems like I saw a script a long time ago to do this. I just
want to duplicate the functionality of [ctrl-alt-del/task man/lock
workstation] and I am not looking to write a whole passworded screen
saver app or anything.

Thanks all! Happy Turkey day!

Re: is it possible to lock desktop (like you can from task manager) by Torgeir

Torgeir
Mon Nov 29 07:54:36 CST 2004

sumGirl wrote:

> I bet it is and I have done a search but found nothing. Anyone do
> this? Seems like I saw a script a long time ago to do this. I just
> want to duplicate the functionality of [ctrl-alt-del/task man/lock
> workstation] and I am not looking to write a whole passworded screen
> saver app or anything.
Hi

This command will do it:

%windir%\SYSTEM32\rundll32.exe user32.dll,LockWorkStation

(note that LockWorkStation is case sensitive).


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx