C# - 编程注销和登录的用户 [英] C# - Programmatically Log-off and Log-on a user

查看:637
本文介绍了C# - 编程注销和登录的用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有在C#中的任何方式来编程登录的Windows用户帐户?

I'd like to know if is there any way in C# to programatically log-in a Windows User Account?

我们目前正在开发一个监控应用程序和一个特征之一是能够注销当前的Windows用户和交换机到另一个Windows用户帐户

We are currently developing an monitoring application and one of the feature is to be able to log-off the current Windows User and switch to another Windows User Account.

我有注销一些一些方法,例如通过API或命令行。但是对于测井中的用户帐户?

I have some few methods for Logging off, such as through API or Command Line. But what about logging-in a user account?

推荐答案

您的意思是交互式的?


  • 注销,如果有任何失败,产生一个请求logoff.exe

  • 登录 - 都能跟得上。这是一个GINA模块,能够在前面(看它在谷歌)去了,但是这是一个非常棘手的野兽做。在Windows中的安全系统是很好隔离出于显而易见的原因(即安全性)。

我不知道的东西,你可以在做C#。

I am not aware of anything you could do in C#.

http://technet.microsoft.com/en-us/library/cc780332%28WS.10%29.aspx

有一些更多详细信息,用户登录如何工作的。

has some more details how user logon works.

这篇关于C# - 编程注销和登录的用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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