NOTICE: Our Community is moving. Get more information.
It is possible to use Mstsc (Remote Desktop Services) from the command line to launch a remote desktop session.
The Silk Test ConsoleClass can be used to launch a console window through which the Mstsc command can be entered, after the remote desktop connection window has launched the OK button on the window can be clicked. For example, the following 4Test demonstrates how to do this:
[+] testcase rdp() appstate none [ ] Console.TypeKeys ("mstsc /v:nwb-asqsrv2 /admin /w:1150 /h:900<Enter>") [ ] Sleep(5) [ ] RemoteDesktopConnect.InputCaptureWindow.Click(MB_LEFT, 580, 640) //Click OK [ ] sleep(2) [ ] Console.Close()