Hi,

I want a script that logs off students after an idletime of n minutes..

I have the following script:

Set oSet =
GetObject("winmgmts://COMPUTER").InstancesOf("Win32_OperatingSystem")
For Each os In oSet
call os.Win32Shutdown(4, 0)
Next

This will log off a user on that computer. But I also need to get the
idletime on a user present on that computer. Is that possible?

I know there's a Idletime in AD on Windows XP, but my clients are
running Windows 2000 Pro Sp4.

I have tried installing the logoff screensaver, but its not working
well. I wanna run this remotely e.g. each hour.

--

Hallstein

Department of Informatics

Re: Logoff when inactive n minutes by Torgeir

Torgeir
Thu Sep 04 12:45:59 CDT 2003

Hallstein wrote:

> I have an alternative, and this is the Logoff-screensaver winexit.scr
> , but that seem to require too much access under
> HKEY_Local_Machine\Software\Microsoft\WindowsNT\CurrentVersion..

If the users are non-admins on the local computer you must add Set Value and
Create Subkey permissions for the group Everyone on this registry key:
HKEY_Local_Machine\Software\Microsoft\WindowsNT\CurrentVersion

How can I use the WinExit screen saver without granting Admin rights?
http://www.jsifaq.com/SUBC/tip1100/rh1179.htm

Logoff Screen Saver Does Not Function in Windows NT
http://support.microsoft.com/default.aspx?scid=kb;EN-US;156677


> So would be very glad if somebody gave me some tips for e.g. an
> alternative screensaver.

ActiveExit for Windows XP-Me-2000-NT-98-95
http://www.winability.com/active-exit/


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