tags:

views:

331

answers:

3

HI,

Can anyone help with code snippet for checking if the workstation is locked? I tried with getting the document.title, so that when the workstation is locked it returns blank for document.title. This is not working.

I am encoding wscript in vbscript which is residing in hmtl.

Any help with Javascript is also fine.

rgds -SHK

+1  A: 

Maybe this might help you? It's a link to Microsoft Technet website in the "Hey, Scripting Guy!" section.

Zaagmans
This excutes saying that ACTIVEX component cannot create GetObject.
Post your code...maybe we can help.
aphoria
A: 

Hi,
Not sure you can check the through a script. Most functions will run as expected. One thing that wouldn't work is sending keys (simulating key press or mouse moves), but you cannot do it from a script on html.
Perhaps you can check instead for idle time since the user's last activity?

Kobi
A: 

If there is a screensaver you may see a process like 'logon.scr'. That won't work though if you don't have the screensaver running. It is pretty easy with .Net though using this code.

You could create that as a COM object and call it from VBScript.

Rob Haupt