Solved

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

Posted on 2013-01-30
8
320 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

When asking a question in a forum or creating documentation, screenshots are vital tools that can convey a lot more information and save you and your reader a lot of time
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

626 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