使用c#代码在Windows XP主登录屏幕中登录.NET [英] .NET logging in windows XP main login screen using c# code

查看:86
本文介绍了使用c#代码在Windows XP主登录屏幕中登录.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的...所以这是我的情况..我需要在Windows启动时使用智能卡登录到Windows XP ...



我已阅读甚至从登录(Windows身份验证)屏幕成功的卡的CSN(UID)...我在服务中使用事件处理程序时遇到了麻烦,所以我去了Windows应用程序而且它甚至在登录之前都很有效..因为我设置了.exe作为启动时的脚本



现在我坚持如何物理登录到Windows ..我在我的代码中硬编码了用户名和密码所以没有问题关于那个...是的我需要这样做..



请帮我解决这个问题..或者一个简单的替代方案...



感谢advence!

ok... so here is my situation.. I need to login into windows XP using a smart card when windows start...

I have read the CSN (UID) of the card even from the login (windows authentication) screen successfully... I was having trouble using event handlers in service so i went for windows app instead and its quite working even before login.. coz i setup the .exe as a script on startup

Now im stuck on how to physically login to windows.. I have hardcoded the username and password in my code so there is no issue about that.. and yes I need to do it like this..

Please help me how to achieve this.. or an easy alternative...

thanks in advence!

推荐答案

如果您正在谈论让您的Windows窗体应用程序执行控制台登录对于用户来说,你不可能。这是违反安全规定的行为。



应用程序可以用户身份登录Windows,但前提是您的应用程序设置为Windows服务并且您指定的帐户具有登录为服务权限。这不会为用户记录控制台。
If you''re talking about having your Windows Forms application do the console login for the user, you can''t. This is a security violation.

The application can log into Windows as a user, but only if your app was setup as a Windows Service and the account you specify has the "Logon as service" permission. This will NOT log the console in for the user.


不,它是简单的FAR。



如果你想要在Windows XP上执行此操作,您必须使用自己的GINA替换GINA。你不打算用C#写一个新的。



在Windows Vista及更高版本上,安全模型已经彻底检修过,所以同样的代码赢了在Vista及以上版本上工作。



截至2014年4月,由于Windows XP支持已经完全失效,我不会浪费你的时间。



无法让现有代码执行您想要的操作。你最好阅读

这个 [ ^ ]看看你在做什么。
No, it''s FAR from simple.

If you want to do this on Windows XP, you''ll have to replace the GINA with your own. You''re NOT going to write a new one in C#.

On Windows Vista and above, the security model has been completely overhauled, so the same code won''t work on Vista and above.

Seeing as Windows XP support is competely dead as of April 2014, I wouldn''t waste your time with it.

There is no way to get your existing code to do what you want. You better read
this[^] to see what you''re in for.


这篇关于使用c#代码在Windows XP主登录屏幕中登录.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆