Sign in to follow this  
Followers 0
iHonda

Win key disable

8 posts in this topic

how do i disable the win key???


A great place to start Autoit 1-2-3

Share this post


Link to post
Share on other sites



Pop the button off the keyboard? Why do you need to disable anyones keys?


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

im trying to make something similar to vaulters computer lock thing here's wut i have so far

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.1.1.0
 Author:         Zmaster <zmaster01@gmail.com>

 Script Function:
    a simple version of Vaulter's computer lockout that allows you to set your own password 

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.6 Prototype

#include <GuiConstants.au3>

GuiCreate("Zmaster's Lock", 1018, 671,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Input_1 = GuiCtrlCreateInput("", 100, 30, 240, 20)
$Button_2 = GuiCtrlCreateButton("Ok", 400, 30, 80, 20)
$Group_3 = GuiCtrlCreateGroup("Input Password and press Ok", 70, 10, 430, 60)
$Date_4 = GuiCtrlCreateDate("Date4", 620, 30, 210, 20)

GUISetState()
GuiSetState(@SW_MAXIMIZE)
Opt ("WinTitleMatchMode", 4)

Winsetstate("classname=Shell_TrayWnd","",@SW_HIDE)
WinSetOnTop("Zmaster's Lock", "", 1)
While 1
    $msg = GuiGetMsg()
    Select
        
    Case $msg = $Button_2
        $1 = GUICtrlRead(3)
        If $1 = "Zmaster" Then
            ToolTip("Good")
            Winsetstate("classname=Shell_TrayWnd","",@SW_Show)
            ExitLoop
        Else
            ToolTip("oops")
            
            ProgressOn("Shut Down", "Shuting Down", "0 percent")
For $i = 10 to 100 step 10
    sleep(1000)
    ProgressSet( $i, $i & " percent")
Next
ProgressSet(100 , "Done", "Complete")
sleep(500)
ProgressOff()
Shutdown(5)
        EndIf
        
        
    Case $msg = $GUI_EVENT_MINIMIZE
        GUISetState(@SW_MAXIMIZE)
        GUISetState()
        
    Case $msg = $GUI_EVENT_RESTORE
        GUISetState(@SW_MAXIMIZE)
        GUISetState()
        
        
    Case $msg = $GUI_EVENT_CLOSE
        
    Case Else
    ;;;
    EndSelect
WEnd
Exit
#endregion --- GuiBuilder generated code End ---

as you can see its very simple i just need to prevent them from opening things or changing windows so i need to kno how to keep this window on top thats y i wanted to disable the win key to prevent them from opening stuff or is there an easier way to do that??

EDIT: ok i found the uh w/e its called to keep it always on top but they can still open stuff but it just gets hidden under the GUI

Edited by Zmaster

A great place to start Autoit 1-2-3

Share this post


Link to post
Share on other sites

these registry key values will disable the windows keys...but it requires a restart:

Key-

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout

Value-

"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,5B,E0,00,00,5C,E0,00,00,00,00

You can use a scancode table chart to disable any other keys you need

Share this post


Link to post
Share on other sites

ok ty i guess i just wont disable that cuz i seriously doubt that is a good idea


A great place to start Autoit 1-2-3

Share this post


Link to post
Share on other sites

well its not bad^^

On my own version of a computer 'lockout' program i close explorer.exe and keep it closed (this keeps all windows keys disabled)

Share this post


Link to post
Share on other sites

ok then how do i re launch explorer.exe i kno its the run command but wut do i put in the parenthasies or do i just run("explorer.exe")


A great place to start Autoit 1-2-3

Share this post


Link to post
Share on other sites

these registry key values will disable the windows keys...but it requires a restart:

Key-

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout

Value-

"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,00,00,5B,E0,00,00,5C,E0,00,00,00,00

You can use a scancode table chart to disable any other keys you need

Dear Mr. Toaster,

If I used the above in a section of code what whould it look like? I need to disable the Windows key on a computer.

Bar Code Boy

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