CodyBarrett Posted March 27, 2009 Share Posted March 27, 2009 (edited) here is a simple desktop locker for Win XP Home... i havent tried on Vista and on Win XP Pro.. you can Lock the workstation EVEN when it is running.. and sometimes on PRO it can be exited withoutght the password (hardcoded for the sake of security)... but im using WIN XP Home right now and it works perfectly have fun you guys!!!here is a mutating-password protected screenlockerexpandcollapse popup#NoTrayIcon #include <GUICONSTANTS.AU3> #include <WINDOWSCONSTANTS.AU3> #include <STATICCONSTANTS.AU3> #include <EDITCONSTANTS.AU3> #include <MISC.AU3> #Include <WinAPI.au3> HotKeySet ('{ENTER}','_PSSWRD') Opt ('GUIoneventmode', 1) $GUIStyle = $WS_POPUP $GUIStyleEx = $WS_EX_TOPMOST $LabelStyle = BitOR ($SS_CENTER, $SS_CENTERIMAGE) $Parent = WinGetHandle ('Program Manager','') $GUI = GUICreate ('', @DesktopWidth, @DesktopHeight, -1, -1,$GUIStyle ,$GUIStyleEx, $Parent) Global $x = 0, $y = 0, $Da = @DesktopWidth / 20, $Dx = $Da - 1, $Db = @DesktopHeight / 20, $Dy = $Db - 1, $Trans = 200,$xy1,$xy2,$xy3,$xy4,$Sleep = 0 Dim $Console[$Da][$Db], $Chr[62] $i = 0 For $ii = 48 to 57 $Chr[$i] = Chr ($ii) $i+=1 Next For $ii = 65 To 90 $Chr[$i] = Chr ($ii) $i+=1 Next For $ii = 97 To 122 $Chr[$i] = Chr ($ii) $i+=1 Next For $i = 0 To $Dx For $ii = 0 To $Dy $Console[$i][$ii] = GUICtrlCreateLabel ('',$x, $y, 20, 20, $LabelStyle) GUICtrlSetBkColor (-1, 0x0) GUICtrlSetColor (-1, 0xFFFFFF) If $i < ($Da/2 - 6) Or $i > ($Da/2 + 5) Or $ii < ($Db/2 - 3) Or $ii > ($Db/2 + 2) Then GUICtrlSetData (-1,$Chr[Random (0,UBound ($Chr) - 1,1)]) Else GUICtrlSetData (-1,Chr (149)) EndIf $y += 20 Next $y = 0 $x += 20 Next _Reset_PWSET () GUISetFont (10,-1,-1,'Tahoma',$GUI) GUISetBkColor (0x00000, $GUI) WinMove ($GUI, '', 0, 0) $GUI2 = GUICreate ('', 200,60, -1, -1,$GUIStyle ,$GUIStyleEx, $GUI) GUISetBkColor (0x00000,$GUI2) $Input = GUICtrlCreateInput ('',0,0,200,60,BitOR ($ES_PASSWORD,$SS_CENTER,$SS_CENTERIMAGE)) GUICtrlSetLimit (-1,4) GUICtrlSetBkColor (-1,0x00000) GUICtrlSetFont (-1, 35-1,'','Tahoma') GUICtrlSetColor (-1, 0xFFFFFF) WinMove ($GUI2,'',@DesktopWidth / 2 - 100, @DesktopHeight / 2 - 30) For $i = 255 To $Trans Step -0.5 WinSetTrans ($GUI,'',$i) WinSetTrans ($GUI2,'',$i) Next WinSetTrans ($GUI2, '', 255) GUISetState (@SW_SHOW,$GUI) GUISetState (@SW_SHOW,$GUI2) While 1 If ProcessExists ('taskmgr.exe') Then ProcessClose ('taskmgr.exe') If Not WinActive ($GUI2,'') Then WinActivate ($GUI2,'') Do $x = Random (0, $Dx,1) $y = Random (0,$Dy,1) Until GUICtrlRead ($Console[$x][$y]) <> Chr (149) GUICtrlSetData ($Console[$x][$y], $Chr[Random (0,UBound ($Chr) - 1,1)]) $Sleep += 1 If $Sleep >= 2000 Then _Reset_PWSET () Sleep (10) WEnd Func _Reset_PWSET () $Sleep = 0 GUICtrlSetColor ($xy1, 0xFFFFFF) GUICtrlSetColor ($xy2, 0xFFFFFF) GUICtrlSetColor ($xy3, 0xFFFFFF) GUICtrlSetColor ($xy4, 0xFFFFFF) Do $x = Random (0, $Dx,1) $y = Random (0,$Dy,1) Until GUICtrlRead ($Console[$x][$y]) <> Chr (149) $xy1 = $Console[$x][$y] Do $x = Random (0, $Dx,1) $y = Random (0,$Dy,1) Until GUICtrlRead ($Console[$x][$y]) <> Chr (149) And $Console[$x][$y] <> $xy1 $xy2 = $Console[$x][$y] Do $x = Random (0, $Dx,1) $y = Random (0,$Dy,1) Until GUICtrlRead ($Console[$x][$y]) <> Chr (149) And $Console[$x][$y] <> $xy1 And $Console[$x][$y] <> $xy2 $xy3 = $Console[$x][$y] Do $x = Random (0, $Dx,1) $y = Random (0,$Dy,1) Until GUICtrlRead ($Console[$x][$y]) <> Chr (149) And $Console[$x][$y] <> $xy1 And $Console[$x][$y] <> $xy2 And $Console[$x][$y] <> $xy3 $xy4 = $Console[$x][$y] GUICtrlSetColor ($xy1, 0xFF0000) GUICtrlSetColor ($xy2, 0xFF8000) GUICtrlSetColor ($xy3, 0xFFFF00) GUICtrlSetColor ($xy4, 0x00FF00) EndFunc Func _PSSWRD () If GUICtrlRead ($Input) = '' Then Return $psswrd = GUICtrlRead ($xy1) & GUICtrlRead ($xy2) & GUICtrlRead ($xy3) & GUICtrlRead ($xy4) If GUICtrlRead ($Input) == $psswrd Then _Exit () GUICtrlSetData ($Input,'') _Reset_PWSET () EndFunc Func _Exit () For $i = $Trans To 0 Step -5 WinSetTrans ($GUI,'',$i) WinSetTrans ($GUI2,'',$i) Next Exit EndFunc Edited October 4, 2009 by CodyBarrett [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
sias Posted March 27, 2009 Share Posted March 27, 2009 Very Nice Program, works on Vista 32-bit. Just for the reference of everyone else. To start the Program push Ctrl/Alt/Numpad+ and the default password is 10.1111.10 I wasn't able to get out of the program without logging off and back on. So it works on Vista! "The true measure of a man is how he treats someone who can do him absolutely no good." Link to comment Share on other sites More sharing options...
CodyBarrett Posted March 27, 2009 Author Share Posted March 27, 2009 im sorry i should have posted that haha thank you my bad UHHHH what else.. pass is hardcoded in CURRENTLY "10.1111.10" and yeah... uhh did you loze anything of value? if so i apologize and im still thinking of a better bothey and maybe traymenus.. and an INI taht is encrypted that will change the password... idk yet [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
sias Posted March 27, 2009 Share Posted March 27, 2009 im sorry i should have posted that haha thank you my bad UHHHH what else.. pass is hardcoded in CURRENTLY "10.1111.10" and yeah... uhh did you loze anything of value? if so i apologize and im still thinking of a better bothey and maybe traymenus.. and an INI taht is encrypted that will change the password... idk yetNo, I didn't lose anything, I always make sure I have everything closed before running any scripts just in case. Also it is my own fault for running a script that locks your computer without first looking in the script for the password "The true measure of a man is how he treats someone who can do him absolutely no good." Link to comment Share on other sites More sharing options...
CodyBarrett Posted March 29, 2009 Author Share Posted March 29, 2009 haha im thinking about having a radom picture background that regenerates every 10 seconds... and password changes... but that would need an INI and unless encrpted inis arent very secure.... [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
sias Posted March 29, 2009 Share Posted March 29, 2009 Just a quick update, after a bit of further testing on Vista I did find that using {Windows Key} + D it brings the Taskbar up long enough to easily exit the script. Unfortunately the windows key can't be set to a dummy function. "The true measure of a man is how he treats someone who can do him absolutely no good." Link to comment Share on other sites More sharing options...
ProgAndy Posted March 29, 2009 Share Posted March 29, 2009 Just a quick update, after a bit of further testing on Vista I did find that using {Windows Key} + D it brings the Taskbar up long enough to easily exit the script. Unfortunately the windows key can't be set to a dummy function.This trick works on XP, too. *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
CodyBarrett Posted March 29, 2009 Author Share Posted March 29, 2009 (edited) damn.. :\ ill work on it.. EDIT i have not been able to get the windows task manager up long enough to close this... it automatically closes it.. wierd how you guys can replicate this Edited March 29, 2009 by CodyBarrett [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Crystall Posted March 29, 2009 Share Posted March 29, 2009 (edited) I think THIS: If WinExists ('Windows Task Manager', '') Then WinKill ('Windows Task Manager', '') Should replace with THIS: If ProcessExists ("taskmgr.exe") Then ProcessClose ("taskmgr.exe") It's will be useful for people who use the non-english version of Windows. Like me - I'm Russian Edited July 8, 2009 by Crystall Hello World! Link to comment Share on other sites More sharing options...
ProgAndy Posted March 29, 2009 Share Posted March 29, 2009 (edited) We do not use the taskmanager, but the trayicon in the taskbar. You should remove the tray icon, at least in locked mode. Otherwise you can use it to exit your Script after Win-D Edited March 29, 2009 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
CodyBarrett Posted March 29, 2009 Author Share Posted March 29, 2009 OH NOW i see how you guys exited it.. alright i edited the first post for the additions... [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Aviax Posted March 29, 2009 Share Posted March 29, 2009 Pretty nice.. Except one thing.. IF ppl got something to close annoying processes, you can use those programs. AND if you're pretty fast, you'll be able to use these programs, just by opening an UPS flash I'd made one of these programs, with autoit.. (Because someone found it fun to spam #{F1} and made my computer crash my "Help and support" windows --') Which with 2 click, did exit your screenlocker.. What i'm suggesting is, that you make another program starting when activating the screenlocker, and if it closes in one special way, then it just restarts it. Link to comment Share on other sites More sharing options...
CodyBarrett Posted March 29, 2009 Author Share Posted March 29, 2009 \any ideas on how to start doing this? because i cant really go Processclose() because people (like yourself) would just make their own program and exit it.... [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Zachlr Posted March 29, 2009 Share Posted March 29, 2009 \any ideas on how to start doing this? because i cant really go Processclose() because people (like yourself) would just make their own program and exit it....You could somehow create a list of processes running when the program starts, and check the current process list against the original, and kill any new ones. That way if any program is started while the computer is locked it will be terminated. Still, if a script is designed with a delay or lock detection you may have a problem. The problem being a vital process could be killed (can't think of an example off the top of my head) but that's what beta testing is for . It's a stretch but it might work. Additionally, did you ever think of a keep alive process, for example design the program to run another instance of itself. The second instance recognizes that the first instance is already running, and goes into keep alive mode. If it detects that the other instance has been terminated, it will go into computer lock mode, and start a new instance of the program, which recognizes that the first instance is already running, and goes into keep alive mode. The process repeats. This would prevent the computer from being unlocked without the help of a script. This would not protect against scripts designed to close both processes faster than the new one can be created, but it's worth a try, and it's more stable than the aforementioned method.One more thing. You may want to detect and kill "cmd.exe" so someone can't just do the taskkill command.Combine all of the above methods and it should be pretty secure. You may want to make them optional during setup in case of problems. Link to comment Share on other sites More sharing options...
CodyBarrett Posted March 29, 2009 Author Share Posted March 29, 2009 alright... ill figure it out... i WILL do the cmd close thing... and maybe even the $array of processes to prevent it... but ill add those next version when i add INI and password change and ect.. [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
Tekki Posted July 18, 2009 Share Posted July 18, 2009 (edited) Laptops dont all have Numpads :/ I changed it for myself though lol I like it Works great to leave your computer running while away (while you dont want anoyone touching it I was wondering. If a program was ran as an administer (Vista) I don't THINK you can kill process without running cmd.exe as admin also. Which I don't think you have time to do before your program comes back to front Edited July 18, 2009 by Tekki If you intend to use Sarcasm you must this sticker!!![size="1"][sub]pic made by manadar[/sub][/size] Link to comment Share on other sites More sharing options...
corgano Posted July 18, 2009 Share Posted July 18, 2009 What if the program exited explorer.exe on startup, and started it again on exit? That way there would be no way to use any other program to close the locker, as you cannot start a program without explorer.exe.(as far as I know) 0x616e2069646561206973206c696b652061206d616e20776974686f7574206120626f64792c20746f206669676874206f6e6520697320746f206e657665722077696e2e2e2e2e Link to comment Share on other sites More sharing options...
Ascend4nt Posted July 18, 2009 Share Posted July 18, 2009 (edited) Pretty neat. Got my Full-Screen Crash Recovery program to stop it though hehe. (And don't add that to the process watch-list please, otherwise I'll have to add yours to mine) *edit: to be helpful - one possible suggestion: use Yashied's HotKey UDF, and block all keystrokes from being passed on to other apps (and keep them all for yourself). This of course won't stop the Async version of my program , but will stop most other things.. I think. (Then again, keyboard hook order might pose a problem..) Edited July 18, 2009 by Ascend4nt My contributions: Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFs |Â Process CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen) |Â Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery Wrappers/Modifications of others' contributions: _DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity) UDF's added support/programming to: _ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne) (All personal code/wrappers centrally located at Ascend4nt's AutoIT Code) Link to comment Share on other sites More sharing options...
egymma Posted August 9, 2009 Share Posted August 9, 2009 (edited) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System","DisableTaskMgr","REG_DWORD","00000001") to disable task manager HotKeySet("!{F4}","altf4") HotKeySet("!{tab}","alttab") _HotKeyAssign($CK_WIN + $VK_E, 'winkeys') _HotKeyAssign($CK_WIN + $VK_F, 'winkeys') _HotKeyAssign($CK_WIN + $VK_R, 'winkeys') _HotKeyAssign($CK_WIN + $VK_L, 'winkeys') _HotKeyAssign($CK_WIN + $VK_U, 'winkeys') _HotKeyAssign($CK_WIN + $VK_D, 'winkeys') to disable key shortcuts Edited August 9, 2009 by egymma [center][/center]My Projects:-[list][*]Window Ender[*]Encryptor-Decryptor[/list] Link to comment Share on other sites More sharing options...
CodyBarrett Posted August 11, 2009 Author Share Posted August 11, 2009 oh geez.. i haven't worked on this one since i last posted XD thanks you guys for the comments and suggestions.. when i have more time ill add to it... [size="1"][font="Tahoma"][COMPLETED]-----[FAILED]-----[ONGOING]VolumeControl|Binary Converter|CPU Usage| Mouse Wrap |WinHide|Word Scrammbler|LOCKER|SCREEN FREEZE|Decisions Decisions|Version UDF|Recast Desktop Mask|TCP Multiclient EXAMPLE|BTCP|LANCR|UDP serverless|AIOCR|OECR|Recast Messenger|AU3C|Tik-Tak-Toe|Snakes & Ladders|BattleShips|TRON|SNAKE_____________________[u]I love the Helpfile it is my best friend.[/u][/font][/size] Link to comment Share on other sites More sharing options...
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