Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works

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

  • Please log in to reply



    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




    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
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