home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
WebService and Mobile Access
Popular Plugins
iPiMP
Start MediaPortal of not running
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mswiege" data-source="post: 682236" data-attributes="member: 83514"><p><strong>Re: Start MediaPortal if not running</strong></p><p></p><p>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.</p><p>Perhaps you would like to add suche a feature in an upcoming release.</p><p></p><p>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. </p><p></p><p>Check this three resources for some information about it:</p><p><a href="http://stackoverflow.com/questions/267838/how-can-a-windows-service-execute-a-gui-application" target="_blank">How can a Windows service execute a GUI application? - Stack Overflow</a></p><p><a href="http://odetocode.com/blogs/scott/archive/2004/10/28/createprocessasuser.aspx" target="_blank">CreateProcessAsUser</a></p><p><a href="http://www.codeproject.com/KB/vb/Windows_Service.aspx" target="_blank">Retrieving Logged In User Name using a Windows Service - CodeProject</a></p><p></p><p>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.</p><p></p><p>Would be happy to see such a feature in the future.</p><p></p><p>Happy coding...</p></blockquote><p></p>
[QUOTE="mswiege, post: 682236, member: 83514"] [b]Re: Start MediaPortal if not running[/b] 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: [url=http://stackoverflow.com/questions/267838/how-can-a-windows-service-execute-a-gui-application]How can a Windows service execute a GUI application? - Stack Overflow[/url] [url=http://odetocode.com/blogs/scott/archive/2004/10/28/createprocessasuser.aspx]CreateProcessAsUser[/url] [url=http://www.codeproject.com/KB/vb/Windows_Service.aspx]Retrieving Logged In User Name using a Windows Service - CodeProject[/url] 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... [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
WebService and Mobile Access
Popular Plugins
iPiMP
Start MediaPortal of not running
Contact us
RSS
Top
Bottom