How to start Windows Media Center from a remote PC using vbscript?

etc6849

Senior Member
I'm working on a two-way driver for Premise that uses the vmccontroller to control Windows 7 Media Center. Some things I'll be including in the Premise module are the ability to: send a msgbox to Media Center (could be used for a door bell alert, caller id, weather warning etc), grab metadata of what's playing and discrete control over ethernet for all extenders and the main PC running Media Center.

The only issue is VMC Controller is an add-in for Media Center, so it will not accept a socket connection if Media Center is not open as it will not be running :(

Is there a simple way to open Media Center on a remote PC using vbscript and/or some third party utility? I'm betting there's an easy way to do this. All that's really required is to run an exe on a networked PC. Any suggestions are welcome, but keep in mind I'm not a programmer. However, I'm very pretty good at vbscript and if the solution is vbscript based, I'll be able to get it to work (after some effort of course).
 
I would take a look at EventGhost, it's free/open source. I used it for a long time to control other PC's via SageTV (software is similar to Girder).
 
Thanks Dan. I took a quick look at Event Ghost last night. Any pointers? There's so many different plugins that I have no idea which one I need.

If Event Ghost can do it, it may make sense to let Event Ghost act as a watch dog. I'm hoping it can start media center after x minutes if it's closed, put media center in full screen after x minutes etc... Or option two would be to have Event Ghost take some input from vbscript, then open Media Center. This input could be from telnet or something like that...
 
Is there a simple way to open Media Center on a remote PC using vbscript and/or some third party utility? I'm betting there's an easy way to do this. All that's really required is to run an exe on a networked PC. Any suggestions are welcome, but keep in mind I'm not a programmer. However, I'm very pretty good at vbscript and if the solution is vbscript based, I'll be able to get it to work (after some effort of course).
There's a few "remote exec" type utilities, but the ones I tried had an issue where they'd either not connect the process to the desktop, or they'd leave a command box open on the target machine until the process terminated. Here's a fairly simple solution (for XP, and probably adaptable) that requires no external utilities.

On the target machine, create a scheduled task to run once with a start date/time in the past. This prevents the task from running. For this example, I have a scheduled task named "vlc" that runs the VLC media player.

In vbs:
Set WShell = WScript.CreateObject("WScript.Shell")
wshell.run "schtasks /run /s server /tn vlc"

This will start task "vlc" on machine "server".

This works with XP and VLC player, but YMMV.

Security, checking if the target program was successfully started, and checking if the target program is already running is an exercise for the user.
 
Thanks Dan. I took a quick look at Event Ghost last night. Any pointers? There's so many different plugins that I have no idea which one I need.

If Event Ghost can do it, it may make sense to let Event Ghost act as a watch dog. I'm hoping it can start media center after x minutes if it's closed, put media center in full screen after x minutes etc... Or option two would be to have Event Ghost take some input from vbscript, then open Media Center. This input could be from telnet or something like that...

Event Ghost can communicate with other instances of Event Ghost via the simple TCP/IP plugin. Event Ghost can also execute actions etc, so it should be pretty easy to get this going.
 
Thanks Video321. I tried the WShell and it didn't seem to work inside Premise, and I think it should (unless your solution is for visual basic and not vbscript). I did read online that some security patch stops WShell from working when trying to execute something for a remote PC (like I'm trying to); this makes sense since

I think it's between your other solution and Dan's for the PC solution :)

The real issue with the Media Center IP based control idea is how to turn on the extender (XBOX360) remotely?!? For now, I may just need to keep using IR to turn on the XBOX 360, then start the telnet connection after 30 seconds or so (after vmccontroller has time to load)... I now have everything working well, except for the on/off part. I'll have to revisit this topic this weekend.
 
Without knowing the real differences between VB and VB Script since I only do basic scripting tasks I would think it should work for you.
As long as you can script a call with parameters you're good to go.
 
You could try MCE Controller and WOL

http://www.kindel.com/products/mcecontroller/

I use both on my Win 7 Media Center with iRule
 
Thanks. I just looked at MCE, but it didn't look like it would work for extenders since it's not a WMC plugin. However, my final solution might be to use both MCE and VMC controller as MCE not being a plugin could also be advantageous. I'm also going to look into using Event Ghost. I installed Event Ghost, but haven't had a chance to play with it.

I wonder if MCE can obtain status of what's playing, display a message box etc...? VMC controller seems to take 30 seconds to load when media center starts. My guess is MCE doesn't suffer from this...
 
Back
Top