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
Products
TV-Server
PowerScheduler++ 1.4.0.x - Stable versions for MediaPortal 1.4
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="DragonQ" data-source="post: 970683" data-attributes="member: 115209"><p>I'm having a problem trying to restart MediaPortal using a VB.NET program run via PS++. Basically, if the argument "wakeup" is passed, then the program does this (simplified):</p><p> </p><p>[code]'Kill MP</p><p>For Each MP As Process In System.Diagnostics.Process.GetProcessesByName("MediaPortal")</p><p> MP.Kill()</p><p> MP.WaitForExit(5000)</p><p>Next</p><p> </p><p>'Stop TV Service</p><p>For Each TVService As Process In System.Diagnostics.Process.GetProcessesByName("TvService")</p><p> TVService.Kill()</p><p> TVService.WaitForExit(5000)</p><p>Next</p><p> </p><p>'Start TV Service</p><p>Dim myService As ServiceController = (From svc In ServiceController.GetServices() Where svc.ServiceName = "TVService").ToArray()(0)</p><p>myService.Start()</p><p>myService.WaitForStatus(ServiceControllerStatus.Running, New TimeSpan(0, 0, 10))</p><p> </p><p>'Start MP</p><p>Dim p As New ProcessStartInfo</p><p>p.FileName = "C:\Program Files (x86)\Team MediaPortal\MediaPortal\MediaPortal.exe"</p><p>Process.Start(p)[/code]</p><p> </p><p>Everything works fine up until starting MediaPortal. Every time it gets to this point, it launches MediaPortal (and it appears in Task Manager) but nothing appears on the screen. The logs show this:</p><p> </p><p>[code]D3D: Exception: Generic application error.[/code]</p><p> </p><p>The weird thing is:</p><ul> <li data-xf-list-type="ul"> Even if I start a batch file that launches MediaPortal instead of launching MediaPortal directly, the same thing happens.</li> <li data-xf-list-type="ul"> The code above for starting MediaPortal works fine when run directly, rather than via PS++.</li> <li data-xf-list-type="ul"> If I just remove the last bit of code above that starts MediaPortal, and instead launch MediaPortal manually after the TV Service has restarted, it opens fine.</li> </ul><p>So basically it looks to be something related to the fact that my VB.NET program is being launched from PS++. Could it be a permissions issue or something?</p></blockquote><p></p>
[QUOTE="DragonQ, post: 970683, member: 115209"] I'm having a problem trying to restart MediaPortal using a VB.NET program run via PS++. Basically, if the argument "wakeup" is passed, then the program does this (simplified): [code]'Kill MP For Each MP As Process In System.Diagnostics.Process.GetProcessesByName("MediaPortal") MP.Kill() MP.WaitForExit(5000) Next 'Stop TV Service For Each TVService As Process In System.Diagnostics.Process.GetProcessesByName("TvService") TVService.Kill() TVService.WaitForExit(5000) Next 'Start TV Service Dim myService As ServiceController = (From svc In ServiceController.GetServices() Where svc.ServiceName = "TVService").ToArray()(0) myService.Start() myService.WaitForStatus(ServiceControllerStatus.Running, New TimeSpan(0, 0, 10)) 'Start MP Dim p As New ProcessStartInfo p.FileName = "C:\Program Files (x86)\Team MediaPortal\MediaPortal\MediaPortal.exe" Process.Start(p)[/code] Everything works fine up until starting MediaPortal. Every time it gets to this point, it launches MediaPortal (and it appears in Task Manager) but nothing appears on the screen. The logs show this: [code]D3D: Exception: Generic application error.[/code] The weird thing is: [LIST] [*] Even if I start a batch file that launches MediaPortal instead of launching MediaPortal directly, the same thing happens. [*] The code above for starting MediaPortal works fine when run directly, rather than via PS++. [*] If I just remove the last bit of code above that starts MediaPortal, and instead launch MediaPortal manually after the TV Service has restarted, it opens fine. [/LIST] So basically it looks to be something related to the fact that my VB.NET program is being launched from PS++. Could it be a permissions issue or something? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Products
TV-Server
PowerScheduler++ 1.4.0.x - Stable versions for MediaPortal 1.4
Contact us
RSS
Top
Bottom