Solved

How to check if a remote machine is locked - Windows XP

Posted on 2013-01-30
8
311 Views
Last Modified: 2013-02-21
Hi All,
I have a few remote machines that we use RDP to access to run automated scripts. When we complete the setup and schedule a run, we close the RDP session but leave caffeine running, then next morning we expect the script have been executed BUT, we find that the machine seems to lock and nothing get run.
So, I want to poll the machines to see if they get locked through the night at some stage but I cant figure out how to do this. The machines do not have a screen saver running so I cannot check if the screensaver.exe process is running.
Also, I was thinking that RDP automatically locks the machine once the session is closed but I can see that if I close the RDP session, then VNC onto the machine, sometimes it's locked, sometimes its not :(

Any ideas ?? All help appreciaited!!
0
Comment
Question by:paddykool
  • 4
  • 3
8 Comments
 
LVL 13

Assisted Solution

by:Alexios
Alexios earned 100 total points
ID: 38836152
Hello

This is a normal behavior that RDP does, it also has many limitations

I suggest, for the kind of the control that you would like to have, to use other software like VNC, teamviewer etc
0
 

Expert Comment

by:rachit311
ID: 38836352
Is it actually the lock that is keeping the scripts from running? What are the power settings for these particular XP machines? Do you have a GPO to handle sleep/hibernation/etc?
0
 

Author Comment

by:paddykool
ID: 38836919
Kostasp:
Thanks for the comment. Can you confirm for me that closeing an RDP session will automatically lock the remote machine ??
Any other suggestions for an alternavite tool . . .  thats free!!

Rachit311:
Thanks. Yes, the lock will prevent a certain part of the script that works on a GUI control. Power options are cool but, whats a GPO ??
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

Author Comment

by:paddykool
ID: 38836929
Also, do any of you know if VNC can bypass a locked screen -> If I use VNC to a locked machine, will it bypass the lock and I be presented with the desktop?
0
 

Expert Comment

by:rachit311
ID: 38837125
ok, wasn't sure about the lock. I do a lot remote and know i can do quite a few things to a locked pc. As far as GPO: GPO is a Group Policy Object or a rule your server hands out to all the computers in a particular organizational unit of your active directory. Like a GPO that tells all the desktop pcs not to hibernate. With a GPO you do not have to go around to individual pcs to make changes to windows settings. The group policy object will apply and make changes to all pcs in the group you assign it to. VNC will give you an "as is" interface meaning if you vnc to a locked pc you will first see the locked screen and have to ctrl-alt-del input pw etc to unlock it. BUT if you hard close a vnc session and do not "log off" the pc it should leave the pc right as it is. ie: no lock, on and displaying the desktop you left it at. Just as long as power settings or screen saver settings don't kick in and lock it or put it to sleep it should be good. Not sure about other free tools. Dameware may be better since it is a paid product and more robust.
0
 

Author Comment

by:paddykool
ID: 38837314
Thanks Rachit311,
Good info there. I think the main problem is people are sometimes using RDP to remote, then closing this session locks the machine. Also, Caffeine.exe may now work after a few hours and the computer locks. Hence the question - how can I find out if a remote machine is locked (programatically)?

Cheers
0
 

Accepted Solution

by:
rachit311 earned 400 total points
ID: 38837398
I hope someone else can chime in on that. Maybe turn on auditing on the local pc? then programatically read the results??? assuming the rdp lock simulates a log off event.

Audit account logon events

Computer Configuration\Windows Settings\Security Settings\Local Policies\Audit Policy

Description
Determines whether to audit each instance of a user logging on to or logging off from another computer in which this computer is used to validate the account.
If you are logging successful Audit account logon events on a domain controller, workstation logon attempts do not generate logon audits. Only interactive and network logon attempts to the domain controller itself generate logon events. In short, "account logon events" are generated where the account lives; "logon events" are generated where the logon attempt occurs.

If you define this policy setting, you can specify whether to audit successes, audit failures, or not audit the event type at all. Success audits generate an audit entry when a logon attempt succeeds. Failure audits generate an audit entry when a logon attempt fails. To set this value to no auditing, in the Properties dialog box for this policy setting, select the Define these policy settings check box and clear the Success and Failure check boxes.
0
 

Author Comment

by:paddykool
ID: 38839003
Not a bad idea!

I'll dig around if locking creates a particuler event

Thanks
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows 2008 Server C Drive too full 25 72
Runas admin but use local user profile 3 36
Juniper VPN for Mac and windows OS 5 38
Cleaning up a desktop after leaving a domain 3 27
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question