agsg Posted May 23, 2011 Share Posted May 23, 2011 Hi, I need to unlock windows 7 programmatically.(provided I have username/password etc and other required credentials) Could anyone provide me some hint to do so. I have to unlock the local PC (windows 7) and show user desktop. I had already done this with Window XP and now want to do it on Win 7. Quote Link to comment Share on other sites More sharing options...
Infiltrator Posted May 24, 2011 Share Posted May 24, 2011 Is the computer you are trying to get in, locked by another user already logged on, or you don't know what the password is and want to get it? Quote Link to comment Share on other sites More sharing options...
agsg Posted May 24, 2011 Author Share Posted May 24, 2011 Is the computer you are trying to get in, locked by another user already logged on, or you don't know what the password is and want to get it? No, Its my own PC with my user account. Probably I myself would have locked it or its locked programmatically. I know the username, password, domain etc. Quote Link to comment Share on other sites More sharing options...
Infiltrator Posted May 24, 2011 Share Posted May 24, 2011 (edited) No, Its my own PC with my user account. Probably I myself would have locked it or its locked programmatically. I know the username, password, domain etc. Do you receive any error, when trying to login? Edit: I am just trying to determine what error you are receiving? Cause if your account is really locked out, you could use some live Linux distribution CDs to boot your computer off it and unlock the account. Edited May 24, 2011 by Infiltrator Quote Link to comment Share on other sites More sharing options...
agsg Posted May 25, 2011 Author Share Posted May 25, 2011 Do you receive any error, when trying to login? Edit: I am just trying to determine what error you are receiving? Cause if your account is really locked out, you could use some live Linux distribution CDs to boot your computer off it and unlock the account. HI Infiltrator, there is no problem with my account. I can manually unlock it if I like. Its just that I want to build an application that can automatically unlock a Win7 PC after 5 min. I have done this in VC++ for Win XP. I need help in doing it on Win 7. If u can provide any link or suggestions to do so then it would be of great help. Please NOTE : My win 7 setup works fine. No problem with my account whatsoever. This thread is to ask for suggestions to unlock Win 7 automatically via some programming language code. Quote Link to comment Share on other sites More sharing options...
Infiltrator Posted May 25, 2011 Share Posted May 25, 2011 You can use Windows group policy to set the duration of how long an account can remain locked out, before it automatically unlocks itself. These articles should help you out. http://technet.microsoft.com/en-us/library/cc739109(WS.10).aspx http://windows.evaguide.com/2010/02/group-policy-account-lockout-duration.html Quote Link to comment Share on other sites More sharing options...
agsg Posted May 25, 2011 Author Share Posted May 25, 2011 You can use Windows group policy to set the duration of how long an account can remain locked out, before it automatically unlocks itself. These articles should help you out. http://technet.microsoft.com/en-us/library/cc739109(WS.10).aspx http://windows.evaguide.com/2010/02/group-policy-account-lockout-duration.html HI Thanks for ur reply. But, I want to do this unlock stuff programatically. I want to built it as an application. The application will implement a security feature based on bluetooth range. once my bluetooth device is not in range then my system is locked/logoff, once my device comes in range then i want to unlock my workstation without entering the password by user. Quote Link to comment Share on other sites More sharing options...
agsg Posted May 25, 2011 Author Share Posted May 25, 2011 HI Thanks for ur reply. But, I want to do this unlock stuff programatically. I want to built it as an application. The application will implement a security feature based on bluetooth range. once my bluetooth device is not in range then my system is locked/logoff, once my device comes in range then i want to unlock my workstation without entering the password by user. A correction to above reply. The application will implement a security feature based on bluetooth range. once my bluetooth device is not in range then my system is locked/logoff, once my device comes in range then i want to unlock my workstation without entering the password by user. username/password will be provide via code. Quote Link to comment Share on other sites More sharing options...
Infiltrator Posted May 25, 2011 Share Posted May 25, 2011 (edited) I like your idea and in fact Microsoft has an utility called Autologon that records your username and password to a file and basically the next time your machine is started, it automatically logs you in. It does not prompt you for the credentials. You could use that along with your program/application to unlock your computer when its in range with your bluetooth device. The moment you walk away from your computer, you could use a dos command such as "rundll32.exe user32.dll, LockWorkStation" to lock your computer screen. That is just an idea. Edited May 25, 2011 by Infiltrator Quote Link to comment Share on other sites More sharing options...
digip Posted May 25, 2011 Share Posted May 25, 2011 I like your idea and in fact Microsoft has an utility called Autologon that records your username and password to a file and basically the next time your machine is started, it automatically logs you in. It does not prompt you for the credentials. You could use that along with your program/application to unlock your computer when its in range with your bluetooth device. The moment you walk away from your computer, you could use a dos command such as "rundll32.exe user32.dll, LockWorkStation" to lock your computer screen. That is just an idea. I believe you can do the reverse, but in windows 7, you might get a UAC prompt while the screen is locked and not be able to respond to it. Probably a PowerShell command to do it these days, since a lot of stuff in PowerShell can bypass UAC all together. Dave kennedy even has a way to make the system dump windows keys via PowerShell and some shell scripting. He might know a way to do what you ask, hit him up on twitter @dave_rel1k Quote Link to comment Share on other sites More sharing options...
agsg Posted May 26, 2011 Author Share Posted May 26, 2011 (edited) HI Infiltrator, The Autologon stuff did not worked on domain based computer although it worked on an independent computer. There is one other thing, I want to make my application as an installer and preferably a window service running in background. Autologon requires a user to do the settings. In winXP , I made it work by simulating Alt+ctrl+del and then passing in password but it didn't work in Win 7. and its nice to see more suggestions coming on this thread :) Edited May 26, 2011 by agsg Quote Link to comment Share on other sites More sharing options...
Infiltrator Posted May 28, 2011 Share Posted May 28, 2011 Did you try contacting that Guy that Digip recommended you to contact? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.