Search code examples
c#parametersremote-desktoprdpmstsc

How to pass parameters to exe in alternate shell rdp


I'm creating an .rdp file (Remote Desktop Protocol), which will open a machine and open a program made by me in .NET C#, I can already do this, but I would need to pass parameters to this program, is there any way?

Commands I'm using in .rdp file:

full address:s: ip_machine
alternate shell:s:c:\MPT\Program.exe

In microsoft documentation I couldn't find anything: https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/rdp-files


Solution

  • I ended up not finding a solution. Apparently it is not possible to pass parameters through the command line, only if it were a RemoteApp, which is not the case, as this should run on old windows.

    I wanted to use parameters to open Forms. But as it was not possible, I will create an .exe for each form, where in the .rdp file I will inform which one I want to open.