VB远程登录用户 [英] VB Remote Logged On User

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

问题描述

我一直试图在VB.NET中找到有关如何连接到计算机并检索登录用户名的方法.如果有人能指出正确的方向或给我一些代码,那就太好了!任何帮助将不胜感激.谢谢!

解决方案

我认为您可以执行qwinsta.exe并检查其结果:

qwinsta.exe/SERVER:localhost

这将产生如下输出:

<字型= 信使新建"> SESSIONNAME USERNAME ID STATE类型的装置,点击服务0光盘,点击控制台约翰1有效结果,鲍勃2光盘结果

 

I have been trying to find something in VB.NET of how to connect to a computer and retrieve the username of the logged on user. If anyone could point me in the right direction or give me some code that would be great! Any help at all would be appreciated. Thank You!

解决方案

I think you could execute qwinsta.exe and examine its results:

qwinsta.exe /SERVER:localhost

This produces output like the following:

 SESSIONNAME       USERNAME                 ID  STATE   TYPE        DEVICE
 services                                    0  Disc
 console           John                      1  Active
                   Bob                       2  Disc


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

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