Click here to Skip to main content
13,198,325 members (66,793 online)
Rate this:
Please Sign up or sign in to vote.
I want to lock and unlock my win 7 workstation using window service. in
case of lock i m able to lock my work station independently by creating an app while i m integrating my code to windows service its unable to execute it and neither unlock my PC. for Unlocking i don't found any thing. Locking is done now i m seeking
for unlock win 7.
i have already go through with Credential Provider(the only option i found) Samples but these samples are not showing there functionality. i have also tried a new approach that to first imprisonateUser and then use this handler to view the desktop from session 1 of win 7, imprisonateUser is done but not found any thing regarding to display the desktop.

if some body knows any thing regarding it please help me out. Thanks
in advance.

MORE INFO FROM OP ======================

i want to implement an 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.
Posted 24-May-11 2:37am
Updated 24-May-11 3:31am
Rate this: bad
Please Sign up or sign in to vote.

Solution 4

If You install own credential provider
You can store user credentials in Your service and unlock computer whenever You want
Dheeraj_Gupta 25-May-11 0:49am
Thanks to u for giving your precious time, yes i m trying for that. and i m already mention in my approaches, but i m not found any output or any functionality on my workstation.

i wanna to do something like this app, but its also not able to unlock the workstation:

i found the trouble in implementing the credential provider.
cariolihome 25-May-11 16:02pm
I can suggest next scenario:

You have to unlock workstation from credential provider
Service You can use as persistent storage of user credentials and means to detect hardware changes

After User enters credentials in Your credential provider window,
You have to store it in service and call ICredentialProviderCredential::GetSerialization Method
LogonUi initiate logon process and terminates credential provider after successfull authentication

After user logoff LogonUi starts Your credential provider again
and Your service can monitor some external events (e.g. some hardware inserting).

After event happened, service notifies credential provider
and returns stored user credentials to it
Credential provider calls ICredentialProviderCredential::GetSerialization Method
Dheeraj_Gupta 1-Jun-11 1:35am
i have tried all but cant get the output, what will happen if i m on domain system?
please help me out, if u can.... thanks...
cariolihome 6-Jun-11 17:30pm
What problem do You have with domain system ?
Dheeraj_Gupta 7-Jun-11 0:07am
Its just a case i have point out while unlocking the machine with win7, if machine is in domain and individual.
rather then still i m not able to unlock the win7 machine.
So anyone if found any thing please help me. Thanks in Advance.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

You can't (and should't) unlock/login to your workstation programatically. That's an extreme violation of security, because if your program can do it, OTHER programs can do it.
SAKryukov 24-May-11 16:40pm
I hope this is just impossible, otherwise all of us are in trouble :-)
My 5.
cariolihome 24-May-11 17:11pm
You can if You want
And it can be more securely then Microsoft native algorithm, because You can unlock only when some hardware inserted
yesotaso 24-May-11 17:39pm
Excuse me... "Swear: 1- curse, obscene language 2- pledge, vow"
If it would be possible then when MS says "We swear, our products are secure" it would mean "@^+#!! Security and $#£+!! you..."
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

My first thought is: Why on earth would you want to do that?

Your machine should never be left unlocked if you are not sitting right in front of it. That is why the locking is there in the first place.

Perhaps a little more information as to what you are trying to accomplish would be helpful to us helping you.

SAKryukov 24-May-11 16:42pm
Ha! So many idiotic down-votes today. Aggressive ignorance is on march. At the same time, it's a valid consideration, my 5. However, it's plain impossible, that's all. Agree with John.
cariolihome 24-May-11 17:41pm
E.g. unlock computer after inserting some hardware device
yesotaso 24-May-11 17:55pm
Please note that, depiction of wrong doing is abuse of the common. There is a thin line there do not cross it.
Dheeraj_Gupta 25-May-11 0:59am
Thanks for giving me ur precious time, i think u all r right, but the thing i m going to do is just similar to face detecting log on, finger touch logon, smart card swap logon etc...
and i want to unlock the workstation based on BlueTooth range of ur mobile security.
i m able to do this on XP
go to the link and u will found the utility that will unlock ur xp work station. i XP this security is implemented through GINA.

now i want to unlock the win 7 work station which is uses Credential Provider(Started from Vista and Later) for LogOn.
I have tried to create the Credential Provider but i cant found its functionality over my win7 work station.

i wanna to do something like this app, but its also not able to unlock the workstation:
Kumar 09 6-Oct-12 3:09am
I am working with credential provider for face detection logon. I wrote some code to display the webcam in commandwindow.cpp for face detecting logon but it display the window not the webcam. I had been searching in google for correct information on credential provider for getting webcam in initial stage of reboot system i.e, at level 0. When system starts the webcam should be displayed try to detect the face. Can any one provide the information about how to display the webcam at level 0.

Thanks in Advance.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.171020.1 | Last Updated 24 May 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100