Jump to content

Lock screen


Recommended Posts

Hello,

I want to make my own lock screen.

You know press windows key+l to lock your computer.

I want to make that but then an .exe file.

What i want that you need to full in a username and a password, save it and then you can lock it.

The computer must not response to any key or mouse click.

When you press the off button on you pc the computer must not shut down but do nothing..

Is there a way to make it?

Does someone has a little code to help me strating?

Greatzz Erik

I little problem, hard to find and fix

Link to comment
Share on other sites

That is a way to lock windows yes.

I want to make may own lock screen whit a picture etc..

How to do that?

is there a way so if you press any key it will not response? it must be full screen so you don't see windows

Edited by Erik.

I little problem, hard to find and fix

Link to comment
Share on other sites

I was justing pointing out with how little code you could do exactly the same, and even make it better without writing a lot of code. It offers little flexibility, but unless you have absolutely nothing to do I would go with that method.. If you want a picture on it, you may put your exe on as a screensaver.. :]

Triumph starts with Try!

Start somewhere, and see where you get stuck..

Edited by Manadar
Link to comment
Share on other sites

i want to give it a try...

it must be full screen and i think it will work whit the code to lock you mouse and keyboard but when you press the esc key it does not work..

It must respronse to nothing..

Could you help me a little?

I little problem, hard to find and fix

Link to comment
Share on other sites

I can list a few functions that you may need, sure...

Function to disable all mouse+keyboard input (Except Ctrl+Alt+Del for obvious safety reasons...)

BlockInput(1)

#region GUI approach

Create a Graphical User interface full screen

GuiCreate("",@DesktopWidth,@DesktopHeight)

Show the GUI

GUISetState()

Put a image on the GUI

GUICtrlCreatePic

#endregion

#region Splash approach

To put a image on your screen

SplashImageOn

To remove it

SplashOff()

#endregion

Edited by Manadar
Link to comment
Share on other sites

Hi,

Thanks for it.

When i make that you never can clode the program..

When you block input and you press ctrl+ctrl+del you set ahotkey on those keys...

I try to make something..

Is there a way do disable the off button on the pc? the button on the case of the pc i mean

And how to delete the beam when you open i gui? so you have full screen

Thanks for helping me

Edited by Erik.

I little problem, hard to find and fix

Link to comment
Share on other sites

No one is going to code it for you. Look at the helpfile befor you post your questions. Specifics help.. "Delete the beam when you open the gui" Look at GUI Control Styles in the help file.

There's no way to stop the reset or power off button the computer. That is a physical switch that is causing a jumper effect on the mother board causing it to reset, or power down. Now for pressing it, not pressing and holding.. How it gives the computer the command to shut down, that may be able to disabled. Im not sure how to go about doing something like that.

I take it you dont want them to be able to shut down the computer, and come up to the computer again, and getting around the screen lock. It can be done with creating a startup task, and registry to tell the autoit program that it was last locked, and the computer was restarted.

Im not sure of your intentions with this program, but it sounds sort of malicious.

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Hi

It is not malicious it is only to protect myself.

I want to use it at school..

I can lock the pc but i want to make my own thing, thats the only thing....

I little problem, hard to find and fix

Link to comment
Share on other sites

#include <GUIConstants.au3>

HotKeySet("{END}", "Quit"); hit end to end the AutoIt Instance

GuiCreate("",@DesktopWidth, @DesktopHeight, "", "", $WS_POPUP)
GUISetState()

While 1
    Sleep(100)
WEnd


;So you can exit if all else goes wrong'
Func Quit()
    Exit
EndFunc

There you go, no window bar. Hit the END key to exit the program if you have any issues. Let me know if you need any other help..

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Thanks allot!

The only thing i now need is some way to disable any key of mouse click, i know autoit cna not do it.

Is there a dll file that can do it or something like that?

I little problem, hard to find and fix

Link to comment
Share on other sites

There's a way to do it. Disable a mouse click?

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

Blockinput(1) then you block everything but not ctrl+alt+delete

I think i know a way you can not use ctrl+alt+del...

You let the program wait till the task mannager will came up.

When it came up you let it close and the use a way to go to the program back..

Do you think it will work?

Edited by Erik.

I little problem, hard to find and fix

Link to comment
Share on other sites

#include <GUIConstants.au3>
#include <misc.au3>
#notrayicon;Gets rid of the tray icon so you can't exit it from there.

HotKeySet("{END}", "Quit"); hit end to end the AutoIt Instance

GuiCreate("",@DesktopWidth, @DesktopHeight, "", "", $WS_POPUP)
GUISetState()


Lock(); Calls it once, since it's not in the while 1 loop.


While 1
_MouseTrap(1, 1, 1, 1); Locks the Mouse in the top left corner.
    Sleep(100)
WEnd

;Disables taskman.
Func Lock()
Run("taskmgr.exe", "", @SW_DISABLE)
EndFunc


;So you can exit if all else goes wrong'
Func Quit()
    _MouseTrap()
    Exit
EndFunc

[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Link to comment
Share on other sites

This is pretty blocking too...

#include <GUIConstants.au3>

HotKeySet("{ESC}",  "Terminate") ;when all else fails ; DELETE THIS IN THE FINAL RELEASE..

$GUI = GUICreate("PC Lock", @DesktopWidth*2,@DesktopHeight*2,-1,-1,$WS_POPUP)
GUISetBkColor(0x0001AB)


Run("taskmgr.exe", "", @SW_DISABLE)
BlockInput(1)

GUISetState()
WinSetOnTop($GUI,"",1)

While 1
    WinActivate($GUI) 
    BlockInput(1) ;prevent the user from gaining control by pressing Ctrl+Alt+Del
    MouseMove(@DesktopWidth,@DesktopHeight,0)
WEnd

Func Terminate()  ; DELETE THIS FUNCTION IN THE FINAL RELEASE..
    While 1
        ExitLoop ; in a loop to make sure the program closes..
    WEnd
EndFunc
Link to comment
Share on other sites

It works good.

You need to do 2 things to unlock.

Press ctrl+alt+delete and then press tab.

It works here..

#include <GUIConstants.au3>
#include <misc.au3>
#notrayicon;Gets rid of the tray icon so you can't exit it from there.
$b = True
If $b = True Then FileInstall("C:\lock.bmp", @WindowsDir &"\lock.bmp")
HotKeySet("{tab}", "Quit"); hit end to end the AutoIt Instance



$gui = GuiCreate("",@DesktopWidth, @DesktopHeight, "", "", $WS_POPUP)
GUICtrlCreateLabel ("",0,0,@DesktopWidth,@DesktopHeight)
GUICtrlCreatePic(@WindowsDir & "\lock.bmp",0,0, 0,0)

GUISetState()


Lock(); Calls it once, since it's not in the while 1 loop.


While 1
    _MouseTrap(1, 1, 2, 2); Locks the Mouse in the top left corner.
    Sleep(100)
WEnd

;Disables taskman.
Func Lock()
BlockInput(1)
Run("taskmgr.exe", "", @SW_DISABLE)
WinKill("Explorer.exe")
EndFunc


;So you can exit if all else goes wrong'
Func Quit()
    BlockInput(0)
    Run("Explorer.exe",@WindowsDir)
    _MouseTrap()
    Exit
EndFunc

There is no other way to unlock(correct me if i am wrong)

I little problem, hard to find and fix

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