Sign in to follow this  
Followers 0
oageng

How to set a Hotkey for the Windows key and Ctrl+Alt+Del?

7 posts in this topic

How can I set a Hotkey for the Windows key, and Ctrl+Alt+Del? The Help says Ctrl+Alt+Del cannot be simulated. Is there a work-around solution? I want to block these key actions

I tried:

HotKeySet("{LWIN}","Nothing");disable the Windows key

HotKeySet("{RWIN}","Nothing");disable the Windows key

HotKeySet("^!{DEL}","Nothing");disable Ctrl+Alt

Func Nothing()
    MsgBox(48, "", "Restricted!")
EndFunc

But this doesnt work!? help..

Share this post


Link to post
Share on other sites



You can't, windows will always stop you - with good reason too!

You can try to disable the effects in a loop, but you can't disable the hotkeys.

MDiesel

Share this post


Link to post
Share on other sites

You can try this, but CTRL-ALT-DEL, in any case you can not block.

#Include <HotKey.au3>

Const $VK_DELETE = 0x2E

_HotKeyAssign(BitOR($CK_CONTROL, $CK_ALT, $VK_DELETE), 'Message', BitOR($HK_FLAG_NOOVERLAPCALL, $HK_FLAG_NOREPEAT))

While 1
    Sleep(10)
WEnd

Func Message()
    MsgBox(0, 'Test', 'CTRL-ALT-DEL is pressed!')
EndFunc   ;==>Message

HotKey.au3

Share this post


Link to post
Share on other sites

You can try this, but CTRL-ALT-DEL, in any case you can not block.

#Include <HotKey.au3>

Const $VK_DELETE = 0x2E

_HotKeyAssign(BitOR($CK_CONTROL, $CK_ALT, $VK_DELETE), 'Message', BitOR($HK_FLAG_NOOVERLAPCALL, $HK_FLAG_NOREPEAT))

While 1
    Sleep(10)
WEnd

Func Message()
    MsgBox(0, 'Test', 'CTRL-ALT-DEL is pressed!')
EndFunc   ;==>Message
What does this really do?

What about the Windows key?

Share this post


Link to post
Share on other sites

You cannot disable the ctrl-alt-del key, but you can know when it is pressed, so you can hide the task manager or whatever.

As for the Win keys, check this out :

http://johnhaller.com/jh/useful_stuff/disable_windows_key/

It's not exactly what you want, but at least you can permanently disable them.

Share this post


Link to post
Share on other sites

Hey, the CTRL+SHIFT+ESC, opens the Task Manager, if you want to disable the Task Manager, there was an entry in Windows Reg, to disable the Task Manager.

PS: if want start task manager in autoit write this code:

Send("^+{ESC}")

Tested and working in Windows Vista Ultimate 64-Bit SP2, without need Adminstrator rights.

Share this post


Link to post
Share on other sites

You cannot disable the ctrl-alt-del key, but you can know when it is pressed, so you can hide the task manager or whatever.

As for the Win keys, check this out :

http://johnhaller.com/jh/useful_stuff/disable_windows_key/

It's not exactly what you want, but at least you can permanently disable them.

I think I do not need to worry about all this anymore. I can close any process launched via the windows key. I was working on something on another post, through the help of other people. Its quite related to this. This actually simulates closing Task manager launched through Ctrl+Alt+Del

#NoTrayIcon

Run("Taskmgr.exe","",@SW_HIDE);register Task Manager(in hidden mode) in the current process list
Global $sPassword = "deception"
Global $aProcList = ProcessList()

HotKeySet("!t", "_Run_TaskMgr");Alt+T will call our function to run task manager
HotKeySet("!e","_Terminate");Exit script

AdlibEnable("_CompareProcesses_Proc", 7000);Every 2 seconds we compare the processes list

While 1
    Sleep(100)
WEnd

Func _Run_TaskMgr() 
;While 1
        Local $iPassword_Ask = InputBox("Acess Task Manager", "Please enter password to run Task Manager:", "", "*")
        If @error Then Return
       
        If $iPassword_Ask == $sPassword Then Return WinSetState("Windows Task Manager","",@SW_SHOW)     
        
        MsgBox(48, "Task Manager Access - Error", "Wrong password, please try again.")
   ;WEnd
EndFunc

Func _CompareProcesses_Proc()
    Call("_Hide_Taskmgr") 
    Local $aCurent_ProcList = ProcessList()
    Local $iProc_Found = 0
   
    For $i = 1 To $aCurent_ProcList[0][0]
        $iProc_Found = 0
       
        For $j = 1 To $aProcList[0][0]
            If $aCurent_ProcList[$i][1] = $aProcList[$j][1] Then
                $iProc_Found = 1                
                ExitLoop            
            EndIf
        Next
            
        If Not $iProc_Found Then ProcessClose($aCurent_ProcList[$i][1])
    Next
EndFunc

Func _Hide_Taskmgr()
    WinSetState("Windows Task Manager","",@SW_HIDE)
EndFunc

Func _Terminate()
    Exit
EndFunc

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