views:

463

answers:

3

I have a c# computer locking system and I am trying to make it so that it shows my unlock form before you log into the computer.

I know this is possible because I have seen it before on another program.

Thanks.

+3  A: 

On old versions of Windows (XP and earlier) there is GINA. There are some tutorials for creating custom ones.

GINA has been replaced with Credential providers in Windows Vista.

Still, whatever you're doing there it's likely not good. There are very few valid reasons to hook into that.

Joey
Nice, thanks, ill have a look at it ;)
Crazyd22
As an application service provider, you may need to brand a citrix login with a customers logos. That is one of the few valid reasons to do it. Then there's the whole being curious thing...
Jason D
+1  A: 

While it is possible to show a custom message before someone logs in, it's not as easy to show your own custom dialog. I'm not sure how you would do it, since you would have to tap into the security side of Windows which is a whole other field.

If instead you just want to show a custom message with an OK button then look at this link for Windows 98/2000 or this link for Windows XP.

Timothy Walters
+1  A: 

If you want to interface with the login form, then you need to write a DLL (NOT a driver) that provides the interface GINA (on XP) and Credential Providers (Vista and windows 7) expects. This isn't very difficult, GINA: Link 1 and Link 2 and Credential Providers. This IS possible with C#, though you'll have the slight overhead of talking to native Win32 and getting native structs from them.

This assumes that you actually do need something more complicated than a stock message box that notifies the user, say, of a TOS before logging in. This is simple to do with group policy.

Daniel Goldberg
Thanks, are there any guides to write a dll?
Crazyd22
To write a generic DLL? I think you can find more than one guide on that. I'll leave it to you to google. :)Writing a custom GINA DLL, Johannes Rossel covered that with his link http://msdn.microsoft.com/en-us/magazine/cc163786.aspx
Daniel Goldberg