How to unlock user PC using C# [duplicate]
Asked Answered
P

2

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?

Pristine answered 12/12, 2012 at 7:19 Comment(3)
Check this out codeproject.com/Articles/16197/…Gaudy
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 luckNadanadab
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?Ryswick
A
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.

Astonied answered 12/12, 2012 at 7:23 Comment(1)
I thought you could not disabled special key's E.G Ctrl+Alt+Delete i thought that hook was tied into the kernelSovereignty
B
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.

Bay answered 12/12, 2012 at 7:36 Comment(2)
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...Pristine
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.Thorbert

© 2022 - 2024 — McMap. All rights reserved.