How to pass parameters to the remote app startup program
I added a configuration with the alias test in the TSAppAllowList registry
Connecting to a remote application using C # can run normally, but I want to pass parameters to the application. What do I need to do?
// rc AxMsRdpClient11NotSafeForScripting
rc.Name = "192.168.1.53";
rc.UserName = "administrator";
rc.Server = "192.168.1.53";
rc.Height = rc.DesktopHeight = this.Height;
rc.Width = rc.DesktopWidth = this.Width;
rc.AdvancedSettings9.SmartSizing = true;
rc.RemoteProgram2.RemoteProgramMode = true;
rc.OnConnected += (o, e) =>
{
//but I want to pass parameters to the application
((ITSRemoteProgram)((IMsRdpClient9)rc.GetOcx()).RemoteProgram2).ServerStartProgram(@"||test", "", "", false, "", false);
};
IMsTscNonScriptable securd = (IMsTscNonScriptable)rc.GetOcx();
rc.AdvancedSettings9.EnableCredSspSupport = true;
securd.ClearTextPassword = "123";
rc.Connect();
New contributor
feng chen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.