Command Parameters for your external players - PLEASE ADD

Re: Command Parameters for your external players - PLEASE ADD

Postby sternenfeuer » Tue Nov 10, 2009 1:29 pm

i recheck that tonight.
sternenfeuer
 
Posts: 308
Joined: Mon Sep 14, 2009 2:20 am

Re: Command Parameters for your external players - PLEASE ADD

Postby roostaar » Tue Nov 10, 2009 1:37 pm

sternenfeuer wrote:i recheck that tonight.


Thank you! :)
roostaar
 
Posts: 43
Joined: Fri May 08, 2009 7:23 pm

Re: Command Parameters for your external players - PLEASE ADD

Postby brainfryd » Wed Nov 11, 2009 12:30 am

Hi All

Have managed to get this working using the shortcuts... BUT had to manually edit mediabrowserxml config file in the ProgramData dir to read the shortcut i.e \\HTPC\Program Files\MPC\MPC.bat-Shortcut.lnk (Am using Win 7 so the shortcut links look slightly different)... .Using the 'browse to' inside the configurator automatically points to the bat file not the shortcut even if that's what is typed

Would recommend creating a backup of your XML file before editing it as its very syntax specific, you are like me and not an expert on XML at all. It will at least give you a reference point to look back at.

My only issue now remains that I get a popup(hidden of course) asking me do I want to allow the shortuct to run and I can't figure out to automatically let it run... it looks like MB has hung but its actually waiting for me to click yes on the hidden prompt. This bit should be easy.. but cant for life remember how to do. (UAC is off btw)

Any help on this would be awesome.

brainfryd
brainfryd
 
Posts: 16
Joined: Wed Jul 15, 2009 9:17 pm

Re: Command Parameters for your external players - PLEASE ADD

Postby sternenfeuer » Wed Nov 11, 2009 8:20 am

Are you logged in as Administrator?

regarding the link: brainfryd is correct, that was the way how i did it as well and it is running perfectly for me.

Only thing popping up for a short time now, while running the batch file, is the taskbar (might be related to windows update as well)
sternenfeuer
 
Posts: 308
Joined: Mon Sep 14, 2009 2:20 am

Re: Command Parameters for your external players - PLEASE ADD

Postby roostaar » Wed Nov 11, 2009 6:25 pm

OK, I edited the xml file as instructed and the .bat runs minimised!

I am logged in as Administrator.

Only problem now is that when MB reloads after watching a video file, it does not open in focus.

The taskbar (with cmd window) is still in focus even though minimised.

I can regain focus by pressing green button on remote but not a smooth experience.

I would rather have the .bat run in a window than have a focus issue.

MCE settings are set to 'MCE always on top'

Q. Is there a switch we can add to the .bat to have it run 'silent'?
roostaar
 
Posts: 43
Joined: Fri May 08, 2009 7:23 pm

Re: Command Parameters for your external players - PLEASE ADD

Postby sternenfeuer » Wed Nov 11, 2009 7:11 pm

if it is set to stay on top it should always get focus. but i think i had this problem as well due to the taskbar popping up. Not much you can do about that except using the green button.
sternenfeuer
 
Posts: 308
Joined: Mon Sep 14, 2009 2:20 am

Re: Command Parameters for your external players - PLEASE ADD

Postby roostaar » Wed Nov 11, 2009 8:27 pm

Hmm.

If MB loads in focus when .bat is in a window, it should also load in focus if .bat is minimised?

Surely?

Is there a way to run the .bat in a silent mode?
roostaar
 
Posts: 43
Joined: Fri May 08, 2009 7:23 pm

Re: Command Parameters for your external players - PLEASE ADD

Postby sternenfeuer » Wed Nov 11, 2009 9:14 pm

no

actually there is, but it requires to run something else which runs the bat then. (found it once while i googled)
sternenfeuer
 
Posts: 308
Joined: Mon Sep 14, 2009 2:20 am

Re: Command Parameters for your external players - PLEASE ADD

Postby roostaar » Wed Nov 11, 2009 10:45 pm

Sorry for my lack of scripting ability but I found some code which could be used to lauch the .bat in silent mode.

Can anyone show me how to set this up??

Set fso = CreateObject("Scripting.FileSystemObject")
Set wsc = CreateObject("WScript.Shell")
Set batch = fso.CreateTextFile("C:\test.bat")
batch.WriteLine ":loop"
batch.WriteLine "ping 127.0.0.1 -t -l 32"
batch.WriteLine "goto loop"
batch.Close
wsc.Run "C:\test.bat", vb hide

:shock:
roostaar
 
Posts: 43
Joined: Fri May 08, 2009 7:23 pm

Re: Command Parameters for your external players - PLEASE ADD

Postby pacoppes » Wed Nov 11, 2009 11:47 pm

roostaar wrote:OK, I edited the xml file as instructed and the .bat runs minimised!

I am logged in as Administrator.

Only problem now is that when MB reloads after watching a video file, it does not open in focus.

The taskbar (with cmd window) is still in focus even though minimised.

I can regain focus by pressing green button on remote but not a smooth experience.

I would rather have the .bat run in a window than have a focus issue.

MCE settings are set to 'MCE always on top'

Q. Is there a switch we can add to the .bat to have it run 'silent'?


You can close the cmd window using the start command.

You can try this which works best.

Code: Select all
@echo off
TASKKILL /F /IM "ehshell.exe" > nul
"C:\Program Files\Combined Community Codec Pack\MPC\mpc-hc.exe" %1 /fullscreen /play /close
start "" "C:\Windows\ehome\ehshell.exe" "/entrypoint:{CE32C570-4BEC-4aeb-AD1D-CF47B91DE0B2}\{FC9ABCCC-36CB-47ac-8BAB-03E8EF5F6F22}" "/directmedia:general"


The start command does not stop the bat and closed, leaving the focus to the Media Center.


A greeting
pacoppes
 
Posts: 3
Joined: Thu Oct 29, 2009 10:45 pm

PreviousNext

Return to General Discussions



Who is online

Users browsing this forum: Google [Bot] and 1 guest