Solved

Force computer to lock after 15 minutes of no activity (Windows 2000 Server & Professional)

Posted on 2004-09-16
5
2,101 Views
Last Modified: 2012-05-05
For out security policies, I need to know how to lock down a computer automatically after so many minutes of inactivity.

What would the proper registry configuration be for this type of task?  The computers are not on a domain and there are no existing policies.  I just need a simple way to use the screensave lock method but I can't find anything very specific on the web.

Thanks,

kruegerste
0
Comment
Question by:kruegerste
[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
  • 3
  • 2
5 Comments
 
LVL 17

Expert Comment

by:Jared Luker
ID: 12079201
0
 
LVL 4

Author Comment

by:kruegerste
ID: 12079237
I see where it lets you set the number of seconds before the screen saver comes on but how do I get it to lock the computer so they must logon again to gain access to the computer.  

Same as Alt + Ctrl + Delete and then lockdown computer.  I want it to do this but automatically.  
0
 
LVL 17

Accepted Solution

by:
Jared Luker earned 500 total points
ID: 12079305
That is what setting ScreenSaveIsSecure to 1 does.  It makes it so that once the screen saver comes on, they need to hit ctrl-alt-delete to enter their password to get back into their boxes.

Here is a vbscript that I wrote to do this.  It might need some tweaking.

Dim NoScreen, SSTimeOut, SSActive, SSLogout, Secure
Dim WshShell, WshSysEnv, WshFSO, WshNetwork
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshSysEnv = WshShell.Environment("SYSTEM")
Set WshFSO = CreateObject("Scripting.FileSystemObject")            'File System Object
Set WshNetwork = WScript.CreateObject("WScript.Network")      'Network Object

WScript.Echo("start screen saver")

      
SSActive = WshShell.RegRead ("HKCU\Control Panel\Desktop\ScreenSaveActive")
Secure = WshShell.RegRead ("HKCU\Control Panel\Desktop\ScreenSaverIsSecure")
SSTimeOut = WshShell.RegRead ("HKCU\Control Panel\Desktop\ScreenSaveTimeOut")
SSLogout = 0


If SSActive = 0 Then
      'WScript.Echo("Screen Saver Not Active")
      WshFSO.CopyFile ScriptFiles + "\ssbezier.scr", windir + "\System32\ssbezier.scr"
      WshShell.RegWrite "HKCU\Control Panel\Desktop\ScreenSaveActive","1","REG_SZ"
      WshShell.RegWrite "HKCU\Control Panel\Desktop\ScreenSaverIsSecure","1","REG_SZ"
      WshShell.RegWrite "HKCU\Control Panel\Desktop\ScreenSaveTimeOut","900","REG_SZ"
      WshShell.RegWrite "HKCU\Control Panel\Desktop\SCRNSAVE.EXE", WinDir + "\System32\ssbezier.scr"
      WshShell.RegWrite "HKCU\Control Panel\Screen Saver.Bezier\Fill",""
      SSLogout = 1
Else
      If Secure = 0 Then
            'WScript.Echo("screen saver active not secure")
            WshShell.RegWrite "HKCU\Control Panel\Desktop\ScreenSaverIsSecure","1","REG_SZ"
            WshShell.RegWrite "HKCU\Control Panel\Desktop\ScreenSaveTimeOut","900","REG_SZ"
            SSLogout = 1
      End If
End If

if SSTimeOut < 900 Then
      WScript.Echo("time less than 900")
      WshShell.RegWrite "HKCU\Control Panel\Desktop\ScreenSaveTimeOut","900","REG_SZ"
      SSLogout = 1
End If

If SSLogout = 1 Then
      Dim oUser, Group
      Set oUser = GetObject("WinNT://hill-2k/" & objUser & ",user")
      For each Group in oUser.Groups      
            Select Case Group.Name
                  Case "LI OU System Admins"
                        WScript.Echo("Admin detected... not rebooting")
                        Exit Function
                  Case "LI OU Func Admins"
                        WScript.Echo("Admin detected... not rebooting")
                        Exit Function
            End Select
      Next
      
      if strOSVersion = "4.0" Then
            WshShell.Popup "Changes To your screen saver security settings require the computer to be rebooted",15,"Reboot for SS Changes"      
            'Reboot NT Machines
            wshShell.Run ScriptFiles & "\shutdown.exe /l /c /t:1",1,False
            WScript.Sleep(5000)
            WScript.Quit
      Else

      'Log user out on 2000/XP Machines
      Dim objWmiService
      WshShell.Popup "Changes To your screen saver security settings require you to log out and back in.",15,"Reboot for SS Changes"            
      strComputer = "."
      Set colOperatingSystems = GetObject("winmgmts:{(Shutdown)}").ExecQuery("Select * from Win32_OperatingSystem")
      For Each objOperatingSystem in colOperatingSystems
      ObjOperatingSystem.Win32Shutdown(logoff)
      Next

      End If
End If
WScript.Echo("Exit screen saver")
0
 
LVL 4

Author Comment

by:kruegerste
ID: 12079364
This is what it gives me but I can't find it in the registry.  It doesn't give me any path.  I used the "find" feature but still nothing.  

 Hive: HKEY_CURRENT_USER
  Key: Control Panel\Desktop
  Value Name: ScreenSaveIsSecure
  Data Type: REG_SZ
  Value: 0  

Do you know what the path is to get to this Key?
0
 
LVL 4

Author Comment

by:kruegerste
ID: 12079405
Nevermind.  Thanks for your help.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Print Server: How to Create it? 1 778
Windows 2000 undelete (free program?) 6 440
Windows 2000 Server Pagefile.sys Error 7 659
How to install Windows 2000 network drivers 4 163
NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

752 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