Jump to content

Unlocking Windows using a script


Recommended Posts

I know there have been numerous conversations on the forum about unlocking Windows with a script and as far as I know no one has figured out a way to do it with AutoIt yet.

Splinterware's System Scheduler claims to be able to do it, and I use LogMeIn.com at home, which presents a dialog on the login screen with an "Unlock" button that unlocks the computer so I know it can be done.

My company enforces a 15+ character (LMHash turned off) complex passphrase with no dictionary words and a 10-minute screen saver limit forced to lock the computer, all of which is audited randomly each month. I would love to create a program that "listens" for a set of keys like ctrl+alt+shift+win+break that unlocks the computer.

Any ideas?

My UDFs: ExitCodes

Link to comment
Share on other sites

I know there have been numerous conversations on the forum about unlocking Windows with a script and as far as I know no one has figured out a way to do it with AutoIt yet.

Splinterware's System Scheduler claims to be able to do it, and I use LogMeIn.com at home, which presents a dialog on the login screen with an "Unlock" button that unlocks the computer so I know it can be done.

My company enforces a 15+ character (LMHash turned off) complex passphrase with no dictionary words and a 10-minute screen saver limit forced to lock the computer, all of which is audited randomly each month. I would love to create a program that "listens" for a set of keys like ctrl+alt+shift+win+break that unlocks the computer.

Any ideas?

i think it could be accomplished using DLLCall()'s, but there are enough ways to avoid the auto lock that i don't think it's even worth researching.
Link to comment
Share on other sites

I want and need the computer to lock when I'm away. I just want a simpler way to unlock it than remembering and entering such a pain-in-the-arse password several times a day.

*EDIT* Basically I'm lazy. i.e. My sig.

And soon unemployed!

You sure you want to violate company policy? You may wish to contact the security people and point out to them that human nature being what it is, security policies that are too onerous actually force users to work around them, causing even greater security problems in the long term.

If in doubt, do the usual thing - write down the password, put in in the top drawer of your desk, lock the drawer and put the key in the second drawer. Don't forget a post-it note on the monitor reminding you where you hid the password. :P

Link to comment
Share on other sites

I don't think there is a way to do it in the way you describe, but you could use a biometric device that stores your password, and that way, all you need is your fingerprint. Remember seeing the ad for thinkpads and it had the Lee Major cameo?

Edited by vollyman
Link to comment
Share on other sites

trying to understand...

1

how about a script that runs ( or you set to run when you know you are going to leave your computer

2

i understand autoit ( hopefully other remote software ) cannot duplicate

ctrl+alt+del

3

this a script like

example


while 1
if winexists("Windows Task Manager") then
; read my password
;send my password where needed
exit
endif
wend
[code=auto:0]

?

8)


            
        

        

        
            

    
        

        
            
        
    

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


MrSpacely
            
            
                Posted 
                
            
        
    
    
        


MrSpacely
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 209
                            
                                
                            
                        
                        
                    
                
            
            
                

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted 
            
            
                
                
            
        
    

    

    

    
        
        
            Actually there are cheap hardware devices wich read fingerprint and can be installed in windows and wich log in on fingerprint.

I going to buy one on usb for 19 euros (wich would be about 22 dollars)
works easy cannot be used from remote control and is really difficult to gues your finger


            
        

        

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


Valuater
            
            
                Posted 
                
            
        
    
    
        


Valuater
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                MVPs
                
                    
                
            
            
                
                    
                        
                            
                                
                            
                                 11.1k
                            
                                
                            
                        
                        
                            
                                
                                    
                                        
                                        7
                                
                                    
                                
                            
                        
                    
                
            
            
                

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted 
            
            
                
                
            
        
    

    

    

    
        
        
            when the task manager is displayed you could hit

file > run> a program to Unlock???

8)


            
        

        

        
            

    
        

        
            
        
    

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


MrSpacely
            
            
                Posted 
                
            
        
    
    
        


MrSpacely
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 209
                            
                                
                            
                        
                        
                    
                
            
            
                

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted 
            
            
                
                    (edited)
                
                
            
        
    

    

    

    
        
        
            when the task manager is displayed you could hitfile > run> a program to Unlock???8)How do you display the taskmgr when the pc is locked it doesn't show up here.


            
                


    Edited  by MrSpacely
    
    

            
        

        

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


Gigglestick
            
            
                Posted 
                
            
        
    
    
        


Gigglestick
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 489
                            
                                
                            
                        
                        
                    
                
            
            
                

            
        
    
    
        



    
        
            
                
                    
                        Author
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted 
            
            
                
                    (edited)
                
                
            
        
    

    

    

    
        
        
            There is software that does what I'm looking for.  One is the LogMeIn.com client.  Once you authenticate to their website and to the target computer, there is a simple "Login" button displayed below the Windows dialog so you can click on that instead of sending a ctrl-alt-del and typing your password.  I just want to listen for a key combo like ctrl-alt-win-shift-pause or something and then simulate this action of simply unlocking the PC.

I don't want to use ctrl-alt-del, or attempt to override it.

I can't use a fingerprint device at work because of security measures that detect unauthorized hardware and the long, involved process of clearing new devices.  This will probably happen eventually anyway, but it won't be for a few years because of the lengths to which my company goes overboard with evaluations of new products.  Of course, I could use this at home and might consider it.

This is really more of a challenge since I've seen other software do it than me being intent on breaking Windows' security.


            
                


    Edited  by c0deWorm
    
    

            
        

        

        
            

    
        

        
            My UDFs: ExitCodes
        
    

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


Valuater
            
            
                Posted 
                
            
        
    
    
        


Valuater
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                MVPs
                
                    
                
            
            
                
                    
                        
                            
                                
                            
                                 11.1k
                            
                                
                            
                        
                        
                            
                                
                                    
                                        
                                        7
                                
                                    
                                
                            
                        
                    
                
            
            
                

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted 
            
            
                
                
            
        
    

    

    

    
        
        
            How do you display the taskmgr when the pc is locked it doesn't show up here.gotcha.. i have never used a lock it was just a thought8)


            
        

        

        
            

    
        

        
            
        
    

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


gamerman2360
            
            
                Posted 
                
            
        
    
    
        


gamerman2360
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 500
                            
                                
                            
                        
                        
                    
                
            
            
                

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted 
            
            
                
                
            
        
    

    

    

    
        
        
            Ive heard things like the windows lock diologue box running on a different desktop or something.  At least I read it in another topic.  Anyway if you want, I guess you could do something like have lock your computer and stuff.  It wouldn't be as safe tho.  you could have it hide all the windows, and make sure the taskmanager couldnt do anything.


            
        

        

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


gamerman2360
            
            
                Posted 
                
            
        
    
    
        


gamerman2360
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 500
                            
                                
                            
                        
                        
                    
                
            
            
                

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted 
            
            
                
                
            
        
    

    

    

    
        
        
            Wow. I just tried renaming taskmgr.exe to something else to  try to get it to not run... It ended up installing it again, lol.  Microsoft is tricky...


            
        

        

        
    

    

    




    Link to comment
    
        
    
    
    

    
    Share on other sites
    

    
        
            

    

        
            

    

        
            

    

        
            

    

        
    


    
    More sharing options...

    


    

                    
                    
                    
                

                    

                    
                    





    

    

    
        
            
                


    
        
    

                
                
                    
                        

                    
                
            
        
        
            
                


gamerman2360
            
            
                Posted 
                
            
        
    
    
        


gamerman2360
            
        
        
            
                
                    


    
        
    

                    
                    
                        

                    
                
            
            
                Active Members
                
            
            
                
                    
                        
                            
                                
                            
                                 500
                            
                                
                            
                        
                        
                    
                
            
            
                

            
        
    
    
        



    
        
            
                
                    
                    
                    
                    
                    
                
            
            
                
                    
                    
                        
                        
                            Share
                        
                        
                        
                        
                        
                            
                                
                            
                            
                            
                            
                            
                            
                        
                    
                
                
            
        

        
            Posted 
            
            
                
                    (edited)
                
                
            
        
    

    

    

    
        
        
            This:; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0.92
; Author:        Steve B
;
; Script Function:
;   Locks Windows.
;
; ----------------------------------------------------------------------------

#NoTrayIcon
Opt("WinTitleMatchMode", 2)
Opt("WinWaitDelay", 0)
Global $desktop_nr = 0, $exitready = 0
HotKeySet("{PAUSE}", "Hide")
AdlibEnable("Adlib")
Hide()

While True
  WinWaitActive("Run")
  WinKill("Run")
WEnd

Func Hide()
    HotKeySet(@HotKeyPressed)
    $list = WinList()
    If $desktop_nr = 0 Then
        For $n = 1 To $list[0][0]
            If Not BitAND(WinGetState($list[$n][1]), 2) Then ContinueLoop
            $desktop_nr = $desktop_nr + 1
            Assign("desktop" & $desktop_nr, $list[$n][1], 2)
            WinSetState($list[$n][1], "", @SW_HIDE)
        Next
    Else
        For $n = 1 To $desktop_nr
            WinSetState(Eval("desktop" & $n), "", @SW_SHOW)
        Next
        $desktop_nr = 0
        Exit
    EndIf
    HotKeySet(@HotKeyPressed, "Hide")
EndFunc ;==>Switch

Func OnAutoItExit()
    If @ExitMethod = 3 Or @ExitMethod = 4 Then Return
    For $n = 1 To $desktop_nr
        WinSetState(Eval("desktop" & $n), "", @SW_SHOW)
    Next
EndFunc

Func Adlib()
    If WinExists("Windows Task Manager") Then WinKill("Windows Task Manager")
EndFunc
will lock all windows and keep "Windows Task Manager" and "Run" from running. If you can setup a Scheduled Task to activate it every time the computer goes idle, you will be set.

[edit]

I've tried using "^!+#{PAUSE}" as the hotkey but it dosn't work... Be careful if you try it.

Edited by gamerman2360
Link to comment
Share on other sites

Understanding your problem, for I'm somewhat in the same boat. You cound do the following, and help everyone in your company. It involves some work, but it will make you look good.

1. Find out how many calls are made to the help desk reguarding password issues.

2. Figure out how long the call takes to resolve, and put that into a dollar amount.

3. price out what what it would cost to install fingerprint devices for all clients - one time cost

4. do a comparison on the one time cost to the running cost of maintaining the password standard currently used.

5. Put this in a document to prove your point.

You can show how to save a bunch of money, and it would fix your problem.

Link to comment
Share on other sites

Thank you all for your efforts, but once again, I am not looking to make Windows lock or prevent it from locking, but to make it easier to unlock Windows once it's already locked (either manually or by the screen saver with the "lock screen" check box enabled).

@volleyman

Thanks, but that's way too involved a process. I'll just continue typing my password, which, to be honest, is what I will end up doing at work even if I can figure out the solution to this problem because of the possibility of being fired for circumventing security measures. I would like to use this at home though where I do keep my computers locked when I'm away.

My UDFs: ExitCodes

Link to comment
Share on other sites

No biggie. I just know management LOVES to be able to save money. Its even better when a employee submits a idea and lets the manager, as well as everyone in the local department get some of the credit. No, it isn't brown nosing, it making everyone on the team look good. This way, more people are behind it, and it is more likely to get done.

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