远程登录和注销 [英] Remote login and logout

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

问题描述

我需要生成一个可以在Windows 2003 Server下运行的应用程序,它将:

1.登录到服务器自己子网上的一组工作站计算机;

2.在命令的情况下退出相同的计算机。



有人可以指点我的示例代码或合适的参考书吗?



我最好的,

Fran Porretto

解决方案

唯一的办法您所描述的是远程桌面到每个工作站。您可以使用远程桌面服务API执行此操作,可以找到其文档这里 [ ^ ]。警告!它不是最友好的API。


您可以远程启动应用程序。最简单的方法是使用 psexec [ ^ ]实用程序,但如果需要,可以编写代码。

使用WMI: http://msdn.microsoft.com/en-us/ library / aa389769(v = vs.85).aspx [ ^ ],如下所示: http://techblog-giri-csharp.blogspot.fr/2008/10/remote-program-execution-using-c-wmi.html [ ^ ]

I have a need to produce an application, which would run under Windows 2003 Server, which would:
1. Log into a group of workstation computers on the server's own subnet;
2. Log out of those same computers when commanded to do so.

Could someone please point me at example code or a suitable reference book?

All my best,
Fran Porretto

解决方案

The only way to do what you describe is to Remote Desktop into each of those workstations. You'd use the Remote Desktop Services API to do this, the documentation of which can be found here[^]. Warning! It's not the friendliest API to use.


You can start an application remotely. The simplest way is to use psexec[^] utility, but you can code it if you want.
With WMI: http://msdn.microsoft.com/en-us/library/aa389769(v=vs.85).aspx[^], like here: http://techblog-giri-csharp.blogspot.fr/2008/10/remote-program-execution-using-c-wmi.html[^]


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

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