Question

When I launch a RemoteApp via Remote Desktop Web Access, is there a way to send data to the remote app?

Desired senario:

A user logs into a website with their credentials. They also provide demographic information such as first name, last name, address, etc.

The website connects to the RemoteApp via SSO and makes the demographic information available to the RemoteApp.

For example, if the RemoteApp is a Windows Forms app, can I get this information and display it in a message box?

Edit1: TomTom's response in this question mentions using named pipes to send data. Is that applicable to this problem?

Was it helpful?

Solution

It turns out you can pass command line parameters to the RemoteApp using the remoteapplicationcmdline property like such:

remoteapplicationcmdline:s:/Parameter1: 5234 /Parameter2: true

(The names "/Parameter1" and "/Parameter2" are just examples. Your remote app will have to define and handle these as appropriate.)

This setting is part of the RdpFileContents property of the MsRdpClientShell object.

Here is a resource for other RdpFileContents properties.

Your code might end up looking something like this:

MsRdpClientShell.PublicMode = true;
MsRdpClientShell.RdpFileContents = 'redirectclipboard:i:1 redirectposdevices:i:0 remoteapplicationcmdline:s:/Parameter1: 5234 /Parameter2: true [Other properties here...]';
MsRdpClientShell.Launch();

For larger amounts of information, we might send preliminary data to a web service, retrieve an identifier back, pass this identifier to the RemoteApp via the command line, then have the RemoteApp query the web service to get all the information.

OTHER TIPS

Of course, for the parameters to be of use the program must be looking for them. Setting up a database to query has a little security issue if it is sensitive data.

If the program (RemoteApp) is looking for data in the form of a CSV or table or something, then you might be able to send a lot of data to be processed. It just depends upon what parameters (and form) the program is going to use.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top