创建一个交互式登录会话 [英] Create an interactive logon session

查看:175
本文介绍了创建一个交互式登录会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个类似于微软的废弃一个实用超快速用户切换(的download ),它允许用户快速切换,而无需通过欢迎屏幕。

I'm trying to create a utility similar to Microsoft's abandoned Super Fast User Switcher (download), which allows fast user switching without going through the Welcome screen.

我必须使用无证 WinStationConnectW API(连同 WTSEnumerateSessions )而已,但是它可以切换工作实现到谁已经登录的用户。

I have a working implementation using the undocumented WinStationConnectW API (along with WTSEnumerateSessions), but it can only switch to a user who is already logged in.

如何创建一个登录会话,以便它可以切换到未登录谁是用户?
我只需要支持XP,但它会是不错的工作,在Vista /七。 (我现在的code已经这样做了)

How can I create a login session so that it can switch to a user who is not logged in?
I only need to support XP, although it'd be nice to work on Vista / Seven. (My current code already does)

我知道这是可能的,因为超快速用户切换做的。 (虽然它需要一个Windows服务来做到这一点)

I know that this is possible because Super Fast User Switcher does it. (Although it needs a Windows service to do it)

我写C#,但我可以把任何答案为C#。

I'm writing C#, but I can translate any answer into C#.

推荐答案

我在XP中通过调用无证 InitiateInteractiveLogon 功能解决了这个 ShellLocalMachine COM对象 shgina.dll

I solved this in XP by calling the undocumented InitiateInteractiveLogon function in the ShellLocalMachine COM object in shgina.dll.

这个方法,它只能通过本地系统帐户被调用,将记录一个用户到控制台。 (它不能在一个RDP会话登录的用户)

This method, which can only be called by the Local System account, will log a user on to the console. (It cannot log a user on to an RDP session)

该DLL的版本包含在Windows 7(和presumably也是Vista的)不包含此方法。

The version of the DLL included with Windows 7 (and presumably also Vista) does not contain this method.

这篇关于创建一个交互式登录会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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