Re: screen saver for auto log off after a certain period of idle time
From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 03/08/05
- Next message: Torgeir Bakken \(MVP\): "Re: Skype and Windows XP Service Pack 2"
- Previous message: Migration Manager: "Skype and Windows XP Service Pack 2"
- In reply to: JC: "screen saver for auto log off after a certain period of idle time"
- Next in thread: JC: "Re: screen saver for auto log off after a certain period of idle time"
- Reply: JC: "Re: screen saver for auto log off after a certain period of idle time"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 08 Mar 2005 17:32:34 +0100
JC wrote:
> I want to automatically logoff a session when it has been idle for a
> configurable time.
>
> In several sources out there I've seen that the better way to do this is to
> use a screen saver like "winexit", but I haven't been able to use it and to
> work without the "Force application termination" option. The problem with
> this option is that the system does not wait the application to terminate,
> and I need that because the application must do some things before ending.
>
> The configuration I've used is to configure a screen saver ("winexit.scr")
> and screen saver activation time in Active Directory (Windows 2000 server)
> in a "group policy"
> b) Clients are Windows XP clients
>
> I need a better solution to do this. Has anyone solved a problem like mine
> (automatic logoff but waiting the applications to finish) ?
Hi
You could create an scheduled task that starts at user logon and is
configured to kick in at a set idle time. Let the scheduled task
launch a script that handles the closing of the app and then logs the
user off.
If you want to use WinXP's shutdown.exe utility, and the user to be
logged off is not the same as the one that is defined in the task,
you might need to enable the remote shutdown privilege for the task
user even if you are going to only operate on the local computer.
If the task user is a member of the local Administrators group, I
think the privilege is already in place.
Take a look here for how to add remote shutdown privilege:
http://groups.google.co.uk/groups?threadm=uq2jIcw2EHA.1564%40TK2MSFTNGP09.phx.gbl
Anyway, Psshutdown.exe in SysInternals's free PSTools suite does not
suffer under this limitation and is the tool I recommend to use in
this case.
Alternatively, to avoid any 3rd party tool, you can use a VBScript
instead (I don't think it have the same issue as shutdown.exe, but I
am not 100% sure):
http://groups.google.co.uk/groups?selm=uq2jIcw2EHA.1564%40TK2MSFTNGP09.phx.gbl
For the application closing part:
The free command line utility Cmdow.exe is an option, using the /CLS
or /END switch.
http://www.commandline.co.uk/cmdow/index.html
Another option is to use use AutoIt/AutoItX and e.g. it's
WinClose function.
Here is an example on WinClose:
http://groups.google.co.uk/groups?selm=3DA05988.9BD87F86%40hydro.com
AutoIt/AutoItX is free and can be found here:
http://www.hiddensoft.com/autoit3/index.php
AutoItX is an ActiveX control version of AutoIt and can be used from a
vbscript.
Note:
AutoIt(X) window handling defaults to match the start of a window title that
you specify, use "SetTitleMatchMode 2" to specify ANY substring of the window
title you want to match. Also, the Windows titles and text are case sensitive.
-- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: http://www.microsoft.com/technet/scriptcenter/default.mspx
- Next message: Torgeir Bakken \(MVP\): "Re: Skype and Windows XP Service Pack 2"
- Previous message: Migration Manager: "Skype and Windows XP Service Pack 2"
- In reply to: JC: "screen saver for auto log off after a certain period of idle time"
- Next in thread: JC: "Re: screen saver for auto log off after a certain period of idle time"
- Reply: JC: "Re: screen saver for auto log off after a certain period of idle time"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|