Shutdown

  • Thread starter Thread starter Sonny
  • Start date Start date
S

Sonny

I was asked to shutdown users after 3 hours of inactivity...any ideas? I'm
completely stumped!

I've been thinking about it for a while now, I am currently using a
customized screensaver with lockout after a timeout of 3600 seconds... so
that option is exhausted.

I'd love to hear your ideas!

Thanks
 
How about using the Power Scheme in the display properties?

One idea is to modify registry entries via the group policy editor.

Another idea is to write some cmd script using the powercfg command and have
it run when the user logs in - again via the group policy editor.

HTH
 
I liked the powercfg route so I wrote a quick vbscript that will work...
just copy the following into a text file and rename it with a .vbs
extension:

Option Explicit
On Error Resume Next

Dim objNetwork, WSHShell
Const WindowStyle = 0
Const WaitOnReturn = True

Set objNetwork = CreateObject("WScript.Network")

Select Case objNetwork.UserName
Case "username1", "username2", "username3"
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.Run "CMD /c powercfg /c ""Test""", WindowStyle, WaitOnReturn
WSHShell.Run "CMD /c powercfg /x ""Test"" /monitor-timeout-ac 180",
WindowStyle, WaitOnReturn
WSHShell.Run "CMD /c powercfg /x ""Test"" /disk-timeout-ac 180",
WindowStyle, WaitOnReturn
Set WSHShell = Nothing
End Select
Set objNetwork = Nothing

Let me know if this is of any use?
 
humm... this seems wonderful!

now.. i thought that the power scheme woudl only hibernate a system and not
shut down!?

i'm going to look into this script tonight and try to implement it on my
test machiens tomorrw!

thansk for the help... hope i can get it working as asked!

thank you!
 
ok... so that script is throwing an error... i'm going to look into it.

however, it seems that it's just going to shutdown the disks and moniter...
however the user will not be logged off the comptuer, which is what we are
trying to achieve... we have issues wiht users not shutting down at night...

thanks for the help though!
 
Back
Top