[REQ] Detection of RDP connection and closing MP (1 Viewer)

Bram

Portal Pro
December 12, 2005
851
3
's-Hertogenbosch
Netherlands Netherlands
I use RDP (the Remote Desktop Protocol) to connect to my HTPC. I know about VNC (and software that does the same) but I don't want to use it. RDP is fast, efficient and in Windows out of the box. There is one disatvantage... DirectX doesn't workt thrue the RDP. So it's not possible to see MP thrue a RDP connection.

What I do now is..

- Connect with Remote Desktop
- Once connected push CTRL+SHIFT+ESC as fast as I can and start clicking "End Task" hoping the taskmanager registers my input. This always works but might take some time.
- Once MediaPortal is closed I see the desktop, but I have the taskbar hidden from within Media Portal (and I like to keep it that way), so I can't use the startmenu and quicklaunche shortcuts. To fix this I go to the TaskManager again and stop the "explorer.exe" task and restart it again by running "explorer" from the Run dialog.


Now I can use the computer again. I could use a simple batch script to restart the explorer.exe task. But that still means I have to close MP manualy, which is a pain in the a** :)


Is there a way to make MediaPortal detect if there is a RDP connection being made and optionaly close itself? I think some people use multiple concurent RDP sessions to manage their computer and don't want MP to close on a RDP connection. So it's probebly wise to make it optional, if at all possible.
 

thachaser

Portal Member
January 11, 2006
9
0
Zwolle, NL
Hi,

Maybe this helps :

there's a program on the web, which allows you to connect with multiple RDP sessions to Windows XP.

I don't know if i can post it here
 

infinite.loop

Retired Team Member
  • Premium Supporter
  • December 26, 2004
    16,163
    4,133
    127.0.0.1
    Austria Austria
    Hi,

    Maybe this helps :

    there's a program on the web, which allows you to connect with multiple RDP sessions to Windows XP.

    I don't know if i can post it here
    sure, you can post name and link to the homepage of this tool.
    as long as the application is not some kind of warez ;)
     

    Bram

    Portal Pro
    December 12, 2005
    851
    3
    's-Hertogenbosch
    Netherlands Netherlands
    I know, but that is not what I prefer. I mainly use RDP to update MP with the latest SV, install codecs, maintain windows and work on a plugin for MP. I prefer to do all this on the same account on which MP is running with MP closed.
     

    thachaser

    Portal Member
    January 11, 2006
    9
    0
    Zwolle, NL
    http://riccardo.raneri.it/blog/eng/index.php/2006/04/24/windows-xp-multiuser-remote-desktop/

    You can find a manual example here.

    I'll post a link to the program tonight, because i don't have this @work

    Bram

    You can try to write a wsh script in vbs, that's detecting if you're running a RDP session. This has te be adjusted to run continueasly so it keeps checking for remote desktop.

    I found this here : http://www.fpschultze.de/smartfaq+faq.faqid+87.htm :

    If fctCheckTS Then
    WScript.Echo "I am running on TS"
    End If
    Function fctCheckTS
    Dim objWsh : Set objWsh = WScript.Shell
    Select Case Left(objWsh.ExpandEnvironmentStrings("%SESSIONNAME%"),3) Case "RDP", "ICA"
    fctCheckTS = True
    Case Else
    fctCheckTS = False
    End Select
    End Function
     

    NickName

    MP Donator
  • Premium Supporter
  • June 23, 2006
    359
    12
    Gold Coast
    You don't need am external program.
    You need the termserv.dll dated 8-5-2004 from XP Mediacentre beta version.
    You change one registry key, enable a rule in gpedit.msc, setup a second user and you're set. :)

    You can login remotely, leaving Mediaportal running (happy wife & kids) and login to a second (different) desktop on the same PC. Naturally you can login as the same account as Mediaportal runs on and Mediaportal is minimised automagically, not logged out. So simply put, two identical or different users, one remotely and one locally, both concurrently.

    This only works on XP Pro & XP Mediacentre, not XP Home.
    I've seen several PCs configured this way. ;-)

    Note to self: I must burnt a certain DLL & instructions to CD for safekeeping...

    Feel free to PM me.

    NickName.

    P.S. Forget what I said above, that link in the previous post (http://sala.pri.ee/?page_id=11) achieves the same thing easier...
     

    Marcusb

    Retired Team Member
  • Premium Supporter
  • February 16, 2005
    1,995
    29
    Melbourne
    As a small bit of additional help. I used to have the same issue with needing to restart Explorer for the start bar to come back, but now I just turn off that option in MP and then set the task bar to auto hide. This works much better and if MP is set to Always on Top then it never appears any way...
     

    Khris

    Portal Pro
    July 2, 2005
    449
    0
    Edmonton, AB
    Canada Canada
    I know about VNC (and software that does the same) but I don't want to use it.
    Let me get this straight, you're reluctant to use a piece of software that is commonly used (and widely accepted) by others, and want a custom solution programmed into MP to suit your specific needs which may or may not be used by anyone else?

    Now I'm not trying to be an ass, however it just doesn't seem logical for the amount of trouble you're willing to go to, when the solution is already evident and simple.

    Log into the remote machine with VNC to shut down MP, then use Remote Desktop.
     

    thachaser

    Portal Member
    January 11, 2006
    9
    0
    Zwolle, NL
    Let me get this straight, you're reluctant to use a piece of software that is commonly used (and widely accepted) by others, and want a custom solution programmed into MP to suit your specific needs which may or may not be used by anyone else?

    Now I'm not trying to be an ass, however it just doesn't seem logical for the amount of trouble you're willing to go to, when the solution is already evident and simple.

    Log into the remote machine with VNC to shut down MP, then use Remote Desktop.
    VNC does in this way the same as RDP so that's no solution. (when using RDP all openened programs show up, except MP because of directX)

    The problem is that he wants to shutdown MP automatically when an RDP session is set-up.
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom