Jump to content

Block input at login screen


rmse17
 Share

Recommended Posts

I am trying to block user input at login screen on WinXP, before a user has a chance to log in. This is done on specific print release stations in our labs, where login is scripted, however there is a window of time when the computer is working on setup tasks and a user may interrupt the process by loging in manually.

I made the following script

BlockInput(1)
$tempfile = FileOpen("C:\BlockRan.txt",1)
FileClose($tempfile)
Sleep(90000)
BlockInput(0)

and added it to the autoexnt.bat file (I have autoexnt service running for the config scripts without user logins)

and restart my machine. Keyboard and mouse function just fine, but the BlockRan file gets created, so I know the script runs... just the blockinput part of it doesn't.

Should I be manually loading some other services/dll's?

Thanks!

Edited by rmse17
Link to comment
Share on other sites

There are quite a few ways to do this particular thing, many are probably more efficient than this, but.., BTW, I left out the file creation, add that before the loop if you want. I wonder if file create before loop and file delete after loop is more appropriate?

#include <Date.au3>
$SleepTime = StringTrimLeft(_DateAdd( 's', 90, _NowCalc()), 11)
ConsoleWrite($SleepTime & @LF)
Do
 BlockInput(1)
 Sleep(100)
Until $SleepTime = @HOUR & ":" & @MIN & ":" & @SEC
ConsoleWrite("Done!" & @LF)
BlockInput(0)

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...