[python-win32] lock workstation

Tim Roberts timr at probo.com
Thu Oct 11 21:33:25 CEST 2007


Tim Golden wrote:
> Tim Roberts wrote:
>   
>> The "usual" way to determine whether the desktop has been locked is to
>> call OpenDesktop on the desktop called "default", and then try to use
>> SwitchDesktop to switch to it.  If the SwitchDesktop fails, then the
>> workstation is locked.  There's an example in Delphi here:
>>     http://www.delphipages.com/threads/thread.cfm?ID=145214&G=145213
>> and one in Visual Basic here:
>>    
>> http://gethelp.devx.com/techtips/nt_pro/10_minute_solutions/10minNT0701-4.asp
>>     
>
> and, indeed, one in Python here:
>
> http://timgolden.me.uk/python/win32_how_do_i/see_if_my_workstation_is_locked.html
>   

Gosh, Tim, is there ANY Windows tool you haven't built?  ;)

I'm starting to think that every Python problem can be solved by either
a 5-line Twisted script, or a script from Tim Golden's web site.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list