Ongoing Remote is dead after stand by/hibernate (1 Viewer)

sbp

Portal Pro
August 10, 2006
192
1
Auning
Home Country
Denmark Denmark
Thank you - these switches was the missing part.
Now my script kills MP after resuming, and then restarts MP

Steen.

The script is here:
Set colMonitoredEvents = GetObject("winmgmts:").ExecNotificationQuery("Select * from Win32_PowerManagementEvent")
Set WshShell = WScript.CreateObject("WScript.Shell")
Do
Set strLatestEvent = colMonitoredEvents.NextEvent
Select Case strLatestEvent.EventType

case 4
' Entering Suspend. uses the XP command taskkill to end a process.


case 7
' Resume from Suspend. Indicates that a ResumeSuspend message has been sent, enabling the computer to return to its regular power state.
WshShell.Run "c:\windows\system32\taskkill /F /IM Mediaportal.exe", 0,1
WshShell.Run """c:\programmer\Team Mediaportal\Mediaportal\Mediaportal.exe""", 1

case 18
'Resume Automatic. Indicates that the computer has awakened in response to an event.
WshShell.Run "c:\windows\system32\taskkill /F /IM MediaPortal.exe", 0,1
WshShell.Run """c:\programmer\Team Mediaportal\Mediaportal\Mediaportal.exe""", 1

End Select
Loop
 

sebrock

New Member
September 14, 2006
89
0
44
this is exactly what I'm looking for. I have the strangest problem with my iMON (also LC16M): some keys work some don't...
 

Users who are viewing this thread

Top Bottom