Sign in to follow this  
Followers 0
KnowledgeSponge

Need Some Help

9 posts in this topic

I recently wrote a program to be used on computers that kids are using. It monitors their time logged in and logs them out when necessary as they are only allowed 30 minutes per day. What I need help with is, does anyone know of a way to either

1) Disable Ctrl Alt Del while the program is running so it cannot be exited

or

2) Keep the program running even if the process is killed(or have it automatically restart if the process is killed).

Anyone have any input for me on that? Thank you much for your ideas.

Share this post


Link to post
Share on other sites



No one has any ideas? :D If anyone can think of a way to avoid the problem please let me know, as while most of the kids do not know how to end a process, some do and I'm sure they would not be close lipped about it.

Ok well, does anyone know how I could make the computer register the program as a SYSTEM process? Then I could just change it to svchost.exe and they would at least have to guess which one it was. That would provide a little more security at least....

Share this post


Link to post
Share on other sites

Are you running XP pro on those computers?

If yes you can use Group policies to restrict what can be done in a user session.

Share this post


Link to post
Share on other sites

Ctrl-Alt-Del can not be disabled under Window 9x/ME/NT/2K/XP because the operating system uses it internally. As for preventing it from being killed, remove the permission for the session to kill a program from task manager. This restriction is not available in Window 9x as far as I know.


David Nuttall
Nuttall Computer Consulting

An Aquarius born during the Age of Aquarius

AutoIt allows me to re-invent the wheel so much faster.

I'm off to write a wizard, a wonderful wizard of odd...

Share this post


Link to post
Share on other sites

One way to get "disable" Ctrl+Alt+Del is to remap the keyboard so that one of these keys does not exist.... (Or maybe remap Ctrl to ScrollLock just to be cautious.) Download RemapKey from here. The RemapKey documentation says it's possible, but I've never tried because it would effect all users (and possibly also affect Safe Mode). I DO NOT RECOMMEND DOING THIS, THOUGH.

I think you could still launch the TaskManager normally (or do a command-line pskill) unless other security restrictions like Nuster suggests are in place.


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

I know this is a slightly old topic, but I am working on a script that also requries the ability to "resurrect" the script it the end user terminates it. My solution is pretty simple. Your main script calls a 2nd script that does nothing but make sure the first process is active. If not, it will re-activate the first script. The first script also uses an AdLib call to make sure the 2nd script is restarted if and when it is no longer running.

One note when using this method: you should have a way (like a title to set the AutoItWin to) to let the scripts know that they "should" finish. Otherwise, which ever one was not shutdown first will try and bring back the other.


[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

No one has any ideas? :D  If anyone can think of a way to avoid the problem please let me know, as while most of the kids do not know how to end a process, some do and I'm sure they would not be close lipped about it. 

Ok well, does anyone know how I could make the computer register the program as a SYSTEM process? Then I could just change it to svchost.exe and they would at least have to guess which one it was.  That would provide a little more security at least....

You can not disable ctrl alt delete but I believe you can send a keystroke if the window shows up that will cancel the window

Rick


Only $2.00 with Resale Rights How to Block Better for Martial Artists and NonMartial Artistshttp://kirkhamsebooks.com/MartialArts/Bloc...tterEbook_m.htm

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

You can not disable ctrl alt delete but I believe you can send a keystroke if the window shows up that will cancel the window

That still doesn't stop the user from using the command line, or another program (like EndItAll, google it if interested) from killing the process that is doing the closing of the taskmanager when it appears. AutoIt wasn't really designed to be a "lock" application since it could be used for :D purposes a lot more eaisily. Try:

Script1- Main script

;some code could go here
Run(@ScriptDir & "\Script2.exe");run the helper script
AdLibEnable("StayAlive");enable saving of the 2nd script if it is shut down
;put the rest of your script here as you would normally
;...
;at the end, send a special message to the 2nd script to shut it down
;this is needed so we don't start this one by mistake:
AdLibDisable()
AutoItWinSetTitle("shutdown")
While ProcessExists("Script2.exe")
  Sleep(100);wait for it to shutdown
WEnd
Exit

Func StayAlive()
  If NOT ProcessExists("Script2.exe") Then Run(@ScriptDir & "\Script2.exe")
EndFunc

Script2 - Helper "StayAlive" script

While 1
  If AutoItWinGetTitle() = "shutdown" Then Exit
  If NOT ProcessExists("Script1.exe") Then Run(@ScriptDir & "\Script1.exe")
  Sleep(250);don't burn out CPU
WEnd

Also note: the main script must have the ability to start over again if the 2nd script has to restart it. You don't know where the code might be when the user could shut it down, so keep this in mind if you use this method.

Edit @ 03:34 CDT on 06-08-04:I added in the AdLibDisable call so that the first script wouldn't launch the 2nd one after we sent it the shutdown request.

Edited by pekster

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Windows Xp You can disable the taskmanager by editing the registry :D

RegWriteRegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "1")

To enable taskmanager again

RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", "REG_DWORD", "0")

Hope that helps you out !

Edited by nova

Share this post


Link to post
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
Sign in to follow this  
Followers 0