{"id":1975,"date":"2013-01-24T10:51:40","date_gmt":"2013-01-24T10:51:40","guid":{"rendered":"http:\/\/www.mjtnet.com\/blog\/?p=1975"},"modified":"2013-01-24T10:51:40","modified_gmt":"2013-01-24T10:51:40","slug":"how-to-tell-if-the-current-session-is-a-remote-desktop-session","status":"publish","type":"post","link":"https:\/\/www.mjtnet.com\/blog\/2013\/01\/24\/how-to-tell-if-the-current-session-is-a-remote-desktop-session\/","title":{"rendered":"How to tell if the current session is a Remote Desktop session"},"content":{"rendered":"<p>Here&#8217;s a small piece of code which will tell you whether the current session is a Remote Desktop\/Terminal Services session or not:<\/p>\n<pre class=\"brush: macroscript\">Let>SM_REMOTESESSION=4096\r\nLibFunc>User32,GetSystemMetrics,isRemote,SM_REMOTESESSION\r\nIf>isRemote>0\r\n    MessageModal>Current Session is RDP\/Terminal Services Session\r\nElse\r\n    MessageModal>Current Session is Local Session\r\nEndif<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a small piece of code which will tell you whether the current session is a Remote Desktop\/Terminal Services session or not: Let>SM_REMOTESESSION=4096 LibFunc>User32,GetSystemMetrics,isRemote,SM_REMOTESESSION If>isRemote>0 MessageModal>Current Session is RDP\/Terminal Services Session Else MessageModal>Current Session is Local Session Endif<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,6],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts\/1975"}],"collection":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/comments?post=1975"}],"version-history":[{"count":6,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts\/1975\/revisions"}],"predecessor-version":[{"id":1981,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/posts\/1975\/revisions\/1981"}],"wp:attachment":[{"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/media?parent=1975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/categories?post=1975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mjtnet.com\/blog\/wp-json\/wp\/v2\/tags?post=1975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}