Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

finding n/w machine's desktop lock status in winXP


  • Please log in to reply

#1
nacodamic

nacodamic

    New Member

  • Member
  • Pip
  • 1 posts
how to find if a network machine running on windows 2000 or windows XP is in locked state or unlocked state. (desktop locking means using ctrl+alt+del enter ).

We can find if a network machine is up or not using ping, but what if I want to know the locked status of the desktop ?
Is there any tool or windows API or a work around to find this ?
  • 0

Advertisements


#2
gerryf

gerryf

    Retired Staff

  • Retired Staff
  • 11,365 posts
Take with a grain of salt...I've had to lock a workstation with a script, and for that there is a winapi that can lock the workstation programattically, called lockworkstation

I don't know if it can be used to achieve what you want, but if the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get the error information, you can use GetLastError in a script....

But, I don't know enough about scripting to know if this would work.

I spend a couple minutes trying to see, but I am afraid it is over my head, but maybe it is not over yours (or someone else).

While looking, though, I stumbled on this (this was all there was on it):


Call OpenInputDesktop with the access mask set to
(DESKTOP_ENUMERATE | DESKTOP_READOBJECTS). If the call
fails you're on the WinLogon desktop. (If you need to)
call GetUserObjectInformation to retrieve the UOI_NAME
value, which will be 'Default' for the normal desktop
or 'Screen-saver' for the screen saver.

You may be able to wait on the desktop handle if it gets
signalled when the 'focus' changes; again, not tried.
Otherwise poll in a 2 or 3 second loop.

HTH, John Bates.


hope that helps
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP