Start MediaPortal of not running (2 Viewers)

mswiege

MP Donator
  • Premium Supporter
  • October 15, 2008
    35
    12
    Home Country
    Germany Germany
    I just got iPiMP up and running. But it only works if MediaPortal is running on the client (if it is not, it tries to WOL the computer).
    Isn't there a way to start MediaPortal from the client device if it is not running?

    BTW: I do not have the TV-Server of MediPortal installed!

    Thanks
     

    cheezey

    Community Plugin Dev
    August 26, 2004
    1,560
    312
    55
    West Yorks, UK
    Home Country
    United Kingdom United Kingdom
    I just got iPiMP up and running. But it only works if MediaPortal is running on the client (if it is not, it tries to WOL the computer).
    Isn't there a way to start MediaPortal from the client device if it is not running?

    BTW: I do not have the TV-Server of MediPortal installed!

    Thanks

    No, this is not possible.
    Posted via Mobile Device
     

    mswiege

    MP Donator
  • Premium Supporter
  • October 15, 2008
    35
    12
    Home Country
    Germany Germany
    Thank you for your response.
    In that case I think I will extend the service myself to do that. Should be quite easy.
     

    cheezey

    Community Plugin Dev
    August 26, 2004
    1,560
    312
    55
    West Yorks, UK
    Home Country
    United Kingdom United Kingdom
    Let me know if you manage to do this, when I've looked at it before you run into security issues, the iPiMPweb service runs as LocalSystem but you need to launch MediaPortal in the context of the current logged on user.
     

    mswiege

    MP Donator
  • Premium Supporter
  • October 15, 2008
    35
    12
    Home Country
    Germany Germany
    Re: Start MediaPortal if not running

    Sadly I'm not able to implement the feature myself because I only have Visual Studio 2005 and also I'm not familiar with VB very much.
    Perhaps you would like to add suche a feature in an upcoming release.

    What you need to do, is to start MediaPortal with the currently logged in user. To do that you can use CreateProcessAsUser and pass it the handle to the his desktop.

    Check this three resources for some information about it:
    How can a Windows service execute a GUI application? - Stack Overflow
    CreateProcessAsUser
    Retrieving Logged In User Name using a Windows Service - CodeProject

    Another problem would be to handle the situation if no user is currently logged in. But in that case you could login a user from the service. Look for WindowIdentity and WindowsPrincipal objects on msdn.

    Would be happy to see such a feature in the future.

    Happy coding...
     

    SiLenTYL

    Retired Team Member
  • Premium Supporter
  • April 23, 2004
    1,144
    159
    Melbourne
    Home Country
    Australia Australia
    theres a setting in the tv server config app to "wake server pc" from a client pc if u wish to watch tv streaming from another client pc

    my system looks like this:

    (PC1)MP server singleseat pc ---ethernet--> Internet Router ---> (PC2)MP client PC(no tv card)

    i usually keep my PC1 on standby if im not using it
    i always have PC2 on (more of a desktop pc with torrents and such and HDD with all my media)

    so..i can be on my PC2 and start MP and start watching TV...it will "wake" PC1

    since PC2 is always on ..possibly this wake command can be passed thru to PC2 from my iphone?? i dunno ...just thinking out load
     

    Commerzpunk

    Retired Team Member
  • Premium Supporter
  • August 29, 2007
    248
    32
    45
    Andernach
    Home Country
    Germany Germany
    AW: Start MediaPortal of not running

    Nobody was able to find a solution? I am looking for this since hours now! Help! :)
     

    Users who are viewing this thread

    Top Bottom