6

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?

Community
  • 1
  • 1
a_dzik
  • 927
  • 2
  • 11
  • 24
  • Check this out http://www.codeproject.com/Articles/16197/Remotely-Unlock-a-Windows-Workstation – Hanlet Escaño Dec 12 '12 at 07:22
  • I believe all security has been set up to avoid this so looks like you're running into a brick wall. The best bet is to look at the finger print process that allows to unlock a PC without entering a password. There must be something you can look up... Good luck – Nick.T Dec 12 '12 at 07:23
  • 2
    A program that automatically *unlocks* the machine, after 30 minutes, no matter what changes in circumstances may have happened in the real world (e.g. who might now be standing next to it). Why bother locking at all? – Damien_The_Unbeliever Dec 12 '12 at 07:44

2 Answers2

2

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.

RAS
  • 3,375
  • 15
  • 24
  • I thought you could not disabled special key's E.G Ctrl+Alt+Delete i thought that hook was tied into the kernel – Barkermn01 Jan 23 '18 at 13:39
1

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.

Lars Nielsen
  • 436
  • 3
  • 16
  • I understand, how stupid is to let unlock system by itself. However, it is only a part of a bigger picture (plan). I just wanted to check how to do that thing... – a_dzik Jan 19 '13 at 17:03
  • 1
    It's not stupid at all. For example, I'm here because I'm trying to implement Google Assistant->IFTTT->Webhooks so I can unlock my home computer remotely for family members without having to tell them my password. To everyone else: Just because you can't think of a good reason to do something doesn't mean there isn't one. – dynamichael Jun 17 '19 at 04:36