Click here to Skip to main content
15,879,095 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Posted
Comments
Zoltán Zörgő 3-Sep-13 18:12pm    
"login" is quite vague in this context, since there are several types of logins. Everything depends on what exactly do you intend to do on the remote machine.
Dave Kreskowiak 3-Sep-13 20:36pm    
OK, you're going to have to define precisely what you mean by "login" to those workstations. To do what exactly?
Fran Porretto 4-Sep-13 6:38am    
Apologies. This is all rather new to me.

My need is merely to get a logged-in session running on each of those workstations. Each workstation is configured such that a login causes the automatic startup of a preinstalled program. In other words, I have no need to interact with any of the workstations in any way, except for:

1. Compelling each of them to start a logged-in session;
2. Eventually compelling each of them to log out and terminate that session.

Are there other details to account for? If so, and if there are many such, is there an available reference work that covers this area, perhaps from Microsoft itself?


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.
 
Share this answer
 
Comments
Fran Porretto 4-Sep-13 8:23am    
"It's not the friendliest API to use."

Holy BLEEP! You hit that nail squarely on the head. Thanks; I'll see if I can muddle through it.

I've been introduced to the Remote Desktop Connection utility program that comes with 2003 Server. Is there a way to script the invocation of that program, perhaps through the WMI?
Dave Kreskowiak 4-Sep-13 8:58am    
Nope!
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[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900