Possible Duplicate:
Unlock Windows programmatically
I am writing an app that will lock and than unlock user PC. Locking a machine is relativeley simple. However unlocking is just plain black magic for me...
Lets assume, that after some event (ex. timer reaches 30 min mark) my app forces my PC to unlock.
I want to unlock latest user (the one that locked the machine) with provided password. I know, that you shouldn't give anyone your passwords, but after all - I am writing that program :)
Sssso... Any hints where to start?
Press CTRL+ALT+DELETE to unlock the computer. Type the logon information for the last logged on user, and then click OK. When the Unlock Computer dialog box disappears, press CTRL+ALT+DELETE and log on normally.
Tap control + alt + delete twice at the login screen for the option to type in a username and enter Administrator which should provide access to a command prompt where you can view Windows accounts by typing net user and apply a new password via net user USERNAME PASSWORD (example: net user Bill bestpassw0rd)
To unlock your account, sign in to get a security code. Tips: You can use any phone number to request the security code. The phone number doesn't need to be associated with your account.
You cannot unlock a machine automatically to my knowledge. What you can do though is to do a fake lock on the machine. Maximize the form, disable all special key combinations, remove explorer, etc. When time is up, do the opposite.
You cannot unlock/log in to windows using c#
You can do it with C++ though, you need to write your own implementation of GINA(Graphical Identification and Authentication)
http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/c87b5f27-fdeb-4b41-88f0-72e140a11358/
However, this is way beyond the borders of BAD security practice, i cannot stress this enough.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With