I’d like to know if there is a way to create and launch a Remote Desktop Session on a Windows Server programmatically.
I’m trying to make an automatic tool to create Local Users and then launch the associate RDP session. I’ve already made LocalUser creation and adding them to Remote Desktop Users (using net.exe).
But I’m struck with the next step : create and launch user’s rdp-session.
I don’t know how to handle this problem without having the Remote Desktop Client Gui.
I’m working on a Windows Server 2003 and I’m using VS2008 with .NET 3.5.
Regards.
You can use the Remote Desktop ActiveX control to connect, you would need to host it in a Form but the form wouldn’t need to be visible. For an example see http://www.codeproject.com/KB/cs/RemoteDesktop_CSharpNET.aspx