RemoteApp and MMC Console

Everything is working fine.
However when I try DNS Console I got this error:

 MMC cannot open the file
 %systemroot%\system32\dnsmgmt.msc
 This may because the file does not exit, is not an MMC console, or was create by a later version. This may also be because you not have sufficient access right to the file.

Solution:
Change RemoteApp command line arg:

%SYSTEMDRIVE%\system32\dnsmgmt.msc /s

to

c:\windows\system32\dnsmgmt.msc /s

Forcing the Remote Desktop option in TS Web Access to use TS Gateway

Step1:  Fix DefaultTSGateway param in IIS Site Application Settings:

rdiis

Step 2: Change BtnConnect() proc gateway param in Desktops.aspx file (only bold line). Desktops.aspx file found in C:\Windows\Web\RDWeb\Pages\<locale> directory (eg. hu-HU or en-US):

function BtnConnect()
 {
 var RDPstr = "full address:s:" + GetParam("MachineName", true, "") + "\n";
 RDPstr += "authentication level:i:2\n";
 RDPstr += "gatewayhostname:s:" + DefaultTSGateway + "\n";
 RDPstr += "gatewaycredentialssource:i:" + GatewayCredentialsSource + "\n";
 if ((DefaultTSGateway != null) && (DefaultTSGateway.length > 0)) {
 RDPstr += "gatewayusagemethod:i:1\n";
 RDPstr += "gatewayprofileusagemethod:i:1\n";
 }
 else {
 RDPstr += "gatewayusagemethod:i:2\n";
 RDPstr += "gatewayprofileusagemethod:i:0\n";
 }

Step 3:
Restart site.

Done 😉