用于登录 Windows 用户的 API

发布于 2024-07-14 03:56:48 字数 130 浏览 3 评论 0原文

我想以交互模式以编程方式登录另一个 Windows 用户。 我已经创建了新的 Windows 用户帐户,并且希望在没有用户交互的情况下将系统切换到该帐户。

您能给我指出一些 API 命令或 MSDN 页面吗? 谢谢

I would like to programmatically login another windows user in interactive mode.
I've created new Windows user account and would like to switch system to that account without of user interaction.

Could you please point me to some API commands or MSDN pages?
Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

月下伊人醉 2024-07-21 03:56:48

看起来 WTSConnectSession 是正确的方向

looks like WTSConnectSession is the right direction

飘落散花 2024-07-21 03:56:48

如果您不是在谈论终端服务器会话,则如果您以该用户身份登录,则需要 LogonUser();如果您想以已登录用户的身份执行某些操作,则需要 ImpersonateLoggedOnUser()。 两者都可以在 Advapi32.lib 中找到。

If you're not talking about a Terminal Server session, you'll want LogonUser() if you're logging in as that user, or ImpersonateLoggedOnUser() if you're wanting to do something as an already-logged in user. Both can be found in Advapi32.lib.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文