Jump to content

Ignore mouse/keyboard input


TeeM
 Share

Recommended Posts

This code will enable or disable Ctr+Alt+Del in Windows XP SP2

That just disables Task Manager. I can still press Ctrl-Alt-Del and doing so might mess up a script that was attempting to interact with other Windows. (XP Pro)

:-(

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

If you don't like the regwrite solution you can also run a key trap in background. This example captures the Ctrl+Break combination.

It can also be adapted to control the Ctrl+Alt+Del combination

While 1

$dll = DllOpen("user32.dll")

Sleep(50)

Blockinput(0)

If _IsPressed('3', $dll) Then ;Ctrl + Break to Stop Breakouts

Blockinput(1)

$Message = " Ctrl+ Break Disabled)

displaymessage()

Endif

Wend

Ant..

Link to comment
Share on other sites

I wrote this code to try and trap the repeated keying of Ctrl+Alt+Del finally settled for the regwrite (published earlier in this topic) process which can be used throughout the code to switch access to Task Manager on and off as and when required.

CODE
If _IsPressed('11', $dll) And _IsPressed('12', $dll) And _IsPressed('2E', $dll) Then ; Disable Ctrl+Alt+Del

Sleep(50)

$PID = ProcessExists("taskmgr.exe")

If $PID Then ProcessClose($PID)

Do

$PID = ProcessExists("taskmgr.exe")

If $PID Then ProcessClose($PID)

Sleep(100)

Until Not _IsPressed('11', $dll)

$i = 0

Do

$i = $i + 1

$PID = ProcessExists("taskmgr.exe")

If $PID Then ProcessClose($PID)

Until $i = 100

$message = " Ctrl+Alt+Del DISABLED"

DisplayMessage()

EndIf

Ant..

Link to comment
Share on other sites

This works on my system (Windows XP SP2) but @SW_ENABLE does not re-instate THE Ctrl+Alt+Del launching of Task Manager

on my system without rebooting.

Ant..

Without Task Manager running,

I ran that one line

then closed Task Manager

(via the icon in the system tray)

I was then able to launch Task Manager normally

(via the Ctrl+Alt+Del method)

[size="1"][font="Arial"].[u].[/u][/font][/size]

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...