InteractiveSession.IsRemote Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Indicates whether the calling process is running in a Remote Desktop session.
public:
static property bool IsRemote { bool get(); };
static bool IsRemote();
public static bool IsRemote { get; }
var boolean = InteractiveSession.isRemote;
Public Shared ReadOnly Property IsRemote As Boolean
Property Value
Boolean
bool
Contains True if the current process is running in a remote session or False otherwise.
Examples
OutputTextBlock1.Text = String.Format("The current session is : {0}",
(InteractiveSession.IsRemote ? "Remote" : "Local"));
OutputTextBlock1->Text = "The current session is : " +
(Windows::System::RemoteDesktop::InteractiveSession::IsRemote ? "Remote" : "Local");
OutputTextBlock1.Text = String.Format("The current session is : {0}",
(If(InteractiveSession.IsRemote, "Remote", "Local")))