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

sbp

Portal Pro
August 10, 2006
192
1
Auning
Home Country
Denmark Denmark
I tried:
"C:\Progra~1\Teamme~1\MediaP~1\MediaPortal.exe", 0
as well as
"C:\Progra~1\Team m~1\MediaP~1\MediaPortal.exe", 0

Still the same error. I kill MP OK, but I cant restart it??


EDIT:
The correct path is
c:\programmer\Team Mediaportal\Mediaportal\Mediaportal.exe

but this don't work either

Steen
 

skoov

Portal Member
September 15, 2006
23
0
Derbyshire
Home Country
United Kingdom United Kingdom
Then it might acutally be progra~2 rather than progra~1

Also I just thought about it and it should also me mediap~1.exe.

Probably the best thing to do is create a batch file with just one line:
c:\programmer\Team Mediaportal\Mediaportal\Mediaportal.exe

and then save it as something like:
c:\bats\mp.bat

and then in your script call that batch file instead:
WshShell.Run "c:\bats\mp.bat", 0

A bit of a long way round but should sort it :)

OR try these lines instead:

Dim MyShell
Dim shell_cmd
shell_cmd = "c:\programmer\Team Mediaportal\Mediaportal\Mediaportal.exe"
set MyShell = CreateObject("WScript.Shell")
MyShell.Run shell_cmd, 1, 1

This is my first VB script, so I'm not too knowledgeable on the subject :)
 

sbp

Portal Pro
August 10, 2006
192
1
Auning
Home Country
Denmark Denmark
Thank you

This bat file doesn't work:
c:\programmer\Team Mediaportal\Mediaportal\mediaportal.exe


However some succes with this:
c:
cd programmer
cd team mediaportal
cd mediaportal
mediaportal.exe

But the comandopromt windows stays open.

So I would like to try the last thing you suggested, but where do I put:

Dim MyShell
Dim shell_cmd
shell_cmd = "c:\programmer\Team Mediaportal\Mediaportal\Mediaportal.exe"
set MyShell = CreateObject("WScript.Shell")
MyShell.Run shell_cmd, 1, 1

In the beginning or at the end, and also how should my path to mediaportal.exe be??
STEEN
 

sbp

Portal Pro
August 10, 2006
192
1
Auning
Home Country
Denmark Denmark
Hi

Also this batch file can start MP
path=c:\programmer\Team Mediaportal\Mediaportal
mediaportal.exe

However, the black commando promt windows stays open, even though MP has started??

Steen
 

skoov

Portal Member
September 15, 2006
23
0
Derbyshire
Home Country
United Kingdom United Kingdom
I should have enclosed the bat command in quotes, but if thats not working anyway just try 2nd option.

you can (i think) just replace:
WshShell.Run "C:\Progra~1\Team~1\MediaP~1\MediaPortal.exe", 0

with these lines:
Dim shell_cmd
shell_cmd = "c:\programmer\Team Mediaportal\Mediaportal\Mediaportal.exe"
WshShell.Run shell_cmd, 0

and you put your full path to mediaportal.exe in the 'shell_cmd' variable like i've done above
 

skoov

Portal Member
September 15, 2006
23
0
Derbyshire
Home Country
United Kingdom United Kingdom
hmm this doesnt seem to work either for me, perhaps there's something I don't understand about VBS yet :)

Let me have a play with it and I'll see if I can work it out...
 

skoov

Portal Member
September 15, 2006
23
0
Derbyshire
Home Country
United Kingdom United Kingdom
Ok, instead of:
WshShell.Run "C:\Progra~1\Team~1\MediaP~1\MediaPortal.exe", 0

try:
WshShell.Run """c:\programmer\Team Mediaportal\Mediaportal\Mediaportal.exe""", 1

I've tried this on my machine and it works - hopefully it will on yours too :)
 

sbp

Portal Pro
August 10, 2006
192
1
Auning
Home Country
Denmark Denmark
Thank you for your help. However, I can't get it to work.
I have come to the conclusion that I can't use both a Taskkill to kill MP command after resuming and then starting MP again. I suspect that these to commands somehow have a competition when initiated shortly after one another??

If I only have the taskkill command - I can get it to kill MP after resuming. But no matter what I do I can't get it to start MP again (even putting in a reference to a bat file)

If I don't put in the Taskkill command, I can get it to start MP after resuming (using the same bat-file as above).

So I'm run out of ideas.
Steen
 

skoov

Portal Member
September 15, 2006
23
0
Derbyshire
Home Country
United Kingdom United Kingdom
Well if that's the case, can't you kill MP when your computer goes into standby (i.e. case 4) and then fire it up when it resumes, rather than both when it resumes?

You could also try:
WshShell.Run "c:\windows\system32\taskkill /F /IM Mediaportal.exe", 0, 1

The extra ', 1' on the end means that the script will wait until the kill command has finished before carrying on with the script. Not sure if this will work or not?

Also just a note, if you're launching MP with the script I think it needs to have ',1' on the end rather than ', 0' because 1 indicates the appearance of the programs window and not starting silently.
 

sbp

Portal Pro
August 10, 2006
192
1
Auning
Home Country
Denmark Denmark
I'm afraid that I can't kill it before it goes into standby, because it is MP which will wake the computer when a recording is scheduled to start.

I wil try the two switches you described.
Steen
 

Users who are viewing this thread

Top Bottom