Prevent users on using ctrl+alt+del to crash master stack

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Pzychi
Posts: 5
Joined: Mon Jul 13, 2015 2:49 pm

Prevent users on using ctrl+alt+del to crash master stack

Post by Pzychi » Mon Jul 13, 2015 2:57 pm

I really need your help . I really dont know how to do this
The objective of this task is to prevent users from using Ctrl-Alt-Del to crash the master stack program. One way to do this is to intercept all keystrokes looking for a control sequence before the key is passed along to the operating system.
In the LiveCoce master stack,if the the character ctrl D is received, then look for ctrl S ctrl I ctrl M when this squence is received, exit the program.
Please help me on this .

Klaus
Posts: 12204
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Prevent users on using ctrl+alt+del to crash master stac

Post by Klaus » Mon Jul 13, 2015 3:07 pm

Hi Pzychi,

1. welcome to the forum! :D

2. I'm afraid this is not possible in LC!
At least not with the build-in means.

The system (Windows) will receive the shortcut Ctrl-Alt-Del FIRST and not
pass it over to LC (or your standalone) in that case!

Maybe this is possible with the help on an external, but I doubt that there is one avaiable.


Best

Klaus

zaxos
Posts: 222
Joined: Thu May 23, 2013 11:15 pm
Location: Greece

Re: Prevent users on using ctrl+alt+del to crash master stac

Post by zaxos » Mon Jul 13, 2015 4:25 pm

Code: Select all

on checkKeysLoop
local theTasks
if the keysDown contain "???" -- you have to find out the code for cntrl+alt+del
   put shell("tasklist") into theTasks
   repeat for each line theTask in theTasks
      if theTask contains "taskmgr.exe" then
         get shell("taskkill /F /IM taskmgr.exe")
         answer warning "YOU CAN NOT USE TASK MANAGER"
      end if
   end repeat
end if
send checkKeysLoop to me in 30 millisec
end checkKeysLoop
Knowledge is meant to be shared.

Klaus
Posts: 12204
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Prevent users on using ctrl+alt+del to crash master stac

Post by Klaus » Mon Jul 13, 2015 4:40 pm

That may work somehow, but will not actually PREVENT this inconvenience! 8)

Pzychi
Posts: 5
Joined: Mon Jul 13, 2015 2:49 pm

Re: Prevent users on using ctrl+alt+del to crash master stac

Post by Pzychi » Mon Jul 13, 2015 4:48 pm

Klaus wrote:Hi Pzychi,

1. welcome to the forum! :D

2. I'm afraid this is not possible in LC!
At least not with the build-in means.

The system (Windows) will receive the shortcut Ctrl-Alt-Del FIRST and not
pass it over to LC (or your standalone) in that case!

Maybe this is possible with the help on an external, but I doubt that there is one avaiable.


Best



Klaus

I was very happy to know that I am very welcome here. I was task to do it but I havent any idea on doing it since I was just started to learn live code, thanks again KLAUS for the explanation. Thumbs uo for you buddy

Pzychi
Posts: 5
Joined: Mon Jul 13, 2015 2:49 pm

Re: Prevent users on using ctrl+alt+del to crash master stac

Post by Pzychi » Mon Jul 13, 2015 4:52 pm

zaxos wrote:

Code: Select all

on checkKeysLoop
local theTasks
if the keysDown contain "???" -- you have to find out the code for cntrl+alt+del
   put shell("tasklist") into theTasks
   repeat for each line theTask in theTasks
      if theTask contains "taskmgr.exe" then
         get shell("taskkill /F /IM taskmgr.exe")
         answer warning "YOU CAN NOT USE TASK MANAGER"
      end if
   end repeat
end if
send checkKeysLoop to me in 30 millisec
end checkKeysLoop

Thanks for this buddy , Im gonna try this one. I really appreciate your help. !,Im very greatful to be part in this community (^o^)

zaxos
Posts: 222
Joined: Thu May 23, 2013 11:15 pm
Location: Greece

Re: Prevent users on using ctrl+alt+del to crash master stac

Post by zaxos » Mon Jul 13, 2015 4:58 pm

That may work somehow, but will not actually PREVENT this inconvenience!
True :/, the only alternative is to hide the process from task manager, whitch is possible but requires some work to be done, if you are interested in this i can guide you through.
Knowledge is meant to be shared.

Pzychi
Posts: 5
Joined: Mon Jul 13, 2015 2:49 pm

Re: Prevent users on using ctrl+alt+del to crash master stac

Post by Pzychi » Mon Jul 13, 2015 5:13 pm

zaxos wrote:
That may work somehow, but will not actually PREVENT this inconvenience!
True :/, the only alternative is to hide the process from task manager, whitch is possible but requires some work to be done, if you are interested in this i can guide you through.

Please guide me through this , im very interested to,know more about it

Klaus
Posts: 12204
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Prevent users on using ctrl+alt+del to crash master stac

Post by Klaus » Mon Jul 13, 2015 5:28 pm

I would not trust any exe that prevents the user from hitting Ctrl-Alt-Del!
I would think this is some kind of malware and delete it. 8)

Pzychi
Posts: 5
Joined: Mon Jul 13, 2015 2:49 pm

Re: Prevent users on using ctrl+alt+del to crash master stac

Post by Pzychi » Mon Jul 13, 2015 5:39 pm

Klaus wrote:I would not trust any exe that prevents the user from hitting Ctrl-Alt-Del!
I would think this is some kind of malware and delete it. 8)

I dont really understand why I have given a task for this (-_-;), I am on my OJT training now so I might lose my job if cant get it sir and thats what Im afraid of. All I can do is follow them .But Im very thankful from all of your suggestions (*_*)

Klaus
Posts: 12204
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Prevent users on using ctrl+alt+del to crash master stac

Post by Klaus » Mon Jul 13, 2015 5:42 pm

No idea what OJT Training is, I'm from germany, but I only wanted to express my very personal own opinion! :D
Good luck with your job!

zaxos
Posts: 222
Joined: Thu May 23, 2013 11:15 pm
Location: Greece

Re: Prevent users on using ctrl+alt+del to crash master stac

Post by zaxos » Mon Jul 13, 2015 6:06 pm

I would not trust any exe that prevents the user from hitting Ctrl-Alt-Del!
I would think this is some kind of malware and delete it.
Who would? :P, hopefully hes not writing a virus or anything...

Check this Pzychi, it does what you want and more, but it requires some work to be done:
http://www.madshi.net/madCodeHookDescription.htm
Knowledge is meant to be shared.

zaxos
Posts: 222
Joined: Thu May 23, 2013 11:15 pm
Location: Greece

Re: Prevent users on using ctrl+alt+del to crash master stac

Post by zaxos » Mon Jul 13, 2015 6:41 pm

An easier aproach (the one i personaly use) would be to use a seperate program made with AutoIt give it the name of a system process (winlogon.exe, svhost.exe...) and script it to check if your process is running, if its not then it starts up your stack. Altho this doesen't prevent your program from being closed from task manager at least it makes sure that if the process closes then it gets restarted. I used this technich in an Internet cafe management program so that users cant close the client.
Knowledge is meant to be shared.

tomBTG
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 72
Joined: Fri Nov 25, 2011 6:42 pm
Location: Kansas City

Re: Prevent users on using ctrl+alt+del to crash master stac

Post by tomBTG » Tue Jul 14, 2015 3:00 pm

Hi,
For programs running on kiosks, one method of preventing ctrl+alt+del is to remove the keyboard and provide an onscreen keyboard that does not include the ctr or alt keys.
Tom B.

paul_gr
Posts: 320
Joined: Fri Dec 08, 2006 7:38 pm
Location: Blenheim, New Zealand

Re: Prevent users on using ctrl+alt+del to crash master stac

Post by paul_gr » Tue Jul 14, 2015 9:35 pm

tomBTG wrote:Hi,
For programs running on kiosks, one method of preventing ctrl+alt+del is to remove the keyboard and provide an onscreen keyboard that does not include the ctr or alt keys.
Tom B.
This, or a special keyboard.

There are other ways to call up the task manager you would have to block :-)

You can use Ctrl-Shift-Esc instead of Ctrl-Alt-Delete, you will get to the task manager faster.
You can also right click on the taskbar and click "start task manager".


Paul

Post Reply

Return to “Windows”