[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 782
  • Last Modified:

Lock Computer after X time of use

I want to use a Win2000 machine to show some programs. And I want the computer to automatically LOCK after X time of being unlocked.

A password protected screen saver LOCKs only after X time of inactivity. In my case, I want to LOCK the PC after X time of being UNLOCKED.

Any hints? Thanks in advance.
0
elguaxo
Asked:
elguaxo
1 Solution
 
rhandelsCommented:
Hi,

Yes, just one... If this is possible (which i doubt), you will need to use either a VB script or a WMI program.. I don't know how to program (maybe someone else does), but i think that you might have a shot in the programming section...
0
 
_Birkoff_Commented:
Yes, you should try some script (but with that I cannot help)...

Or just try a software... I know Sysguard (http://www.idiogensoftware.com/sysguard/index.php) can do what yo want (but It does not locks the computer with Windows lock, it has its own Lock window... I dont know if that is a problem to you)...

Cristian
0
 
LongbowCommented:
Download & Install AutoIT v3 - It is free.
http://www.hiddensoft.com/autoit3/

Save the following in autolock.au3 and run it (right click / run script).
It will lock the computer the 1st time just after his execution
Then it waits 5 seconds for 15 seconds.

You can make a .exe from this script. :

$i = 0

Do
Sleep(5000) ;five seconds
WinWaitNotActive("Unlock Computer", "", 5)
Run("rundll32 user32.dll,LockWorkStation", "", @SW_HIDE)
MsgBox(4096, "Test", "Unlock in 15 seconds", 15)
MsgBox(4096, "Test", "Unlock in 10 seconds", 10)
MsgBox(4096, "Test", "Unlock in 5 seconds", 5)

$i = $i + 1
Until $i = 0
0
 
LongbowCommented:
Add the next line to the first line in your script.
It hides the AutoIT icon in the System Tray.

AutoItSetOption ( "TrayIconHide", 1 )
0
 
TJworldCommented:
The famous SysInternals have a great program for this: PsShutdown

http://www.sysinternals.com/ntw2k/freeware/psshutdown.shtml

You can run it across the network too, so you can effectively remotely control another system.

To lock the console after X seconds use the command:

From the local computer: psshutdown -l -t X

From the network: psshutdown \\computername -l -t X

All you need do is execute that program at the start of the demo/show, probably from a batch file that runs as part of the show?
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now