oageng Posted May 25, 2009 Posted May 25, 2009 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..
Mat Posted May 25, 2009 Posted May 25, 2009 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 AutoIt Project Listing
Yashied Posted May 25, 2009 Posted May 25, 2009 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 ;==>MessageHotKey.au3 My UDFs: Reveal hidden contents iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
oageng Posted May 25, 2009 Author Posted May 25, 2009 Yashied said: 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?
Inverted Posted May 25, 2009 Posted May 25, 2009 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.
StreetRacer Posted May 25, 2009 Posted May 25, 2009 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.
oageng Posted May 25, 2009 Author Posted May 25, 2009 Inverted said: 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 expandcollapse popup#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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now