After having installed the MediaPortal TV Server (dear development team: A great bravo and thank you for your outstanding work) I touched the problem that I have to keep my server switched on 24 hours/day, 7 days/ week, while I need it only a few hours per day. Looking in the Powerscheduler, I saw that this one can only handle a single seat configuration, but not my config with 1 server and 4 clients.
So I was searching for a work-around, and I wanted to share with you what I have installed (and for me it’s running fine).
Idea was to use the possibility of the Powerscheduler which is integrated in the TV Server to check for running processes. This means that every client has to start his own process on the server when he is logging in, and kill this process when he is logging out.
Sample-configuration :
Server: PC250
Client 1: PC001
Client 2: PC002
Client 3: PC003
We need to download two programs (freeware) :
Pstools: http://www.microsoft.com/technet/sysinternals/utilities/pstools.mspx
wolcmd: http://www.depicus.com/download.aspx?product=commandline
Out of the PsTools we need only the programs PsExec and PsKill.
The program wolcmd is for waking up the server from hibernate or suspend.
For each client we create a unique exe file in this directory of the Server. For this we can take any Windows program which can be executed in several instances in parallel, no functionality is needed, we need only processes. A simple one is calc.exe (you can find it in the \system32\ folder), or use this wonderfull attached program (client1active.exe) which I have written during long hours (1 line source-code) which only right to exist is to exist. It’s doing nothing but waiting for being killed (your can “kill” it with any key). For each client you create a new copy:
Client1: Client1active.exe
Client2: Client2active.exe
Client3: Client3active.exe
Etc.
These files you locate in your Powerschedule directory of the Server (let’s say “F:\PowerScheduler”).
Now you have to create a batchfile for each program:
Client1active.bat:
START /min client1active.exe
Client2active.bat:
START /min client2active.exe
Etc.
Having done this we have to integrate these processes in the Powerscheduler as processes which prevent the system to enter in standby. (For this the processes has to be started.)
Finally you have to create a new user on the server. Let’s call him “client” and give him a password (password is needed, because Win XP does not allow remote access without password).
On each Client you create a start directory for MediaPortal on your Clientcomputer :
“C:\MPStart\”
In this directory you copy your program PsExec, PsKill and wolcmd and create a batchfile to start MediaPortal (MPStart.bat):
wolcmd [mac address] [ip address] [subnet mask] [port number]
psexec \\pc250 -u client -p password -i F:\powerscheduler\clientxactive.bat
"C:\Program Files\Team MediaPortal\MediaPortal\MediaPortal.exe"
pskill \\pc250 -u client -p password clientxactive.exe"
pc250 is the name of the server
password is the password of the user “Client” on the server.
the x has to be replaced by the number of the client
the “F:\Powerschedule\” has to be the directory you’ve created above.
That’s all: instead of starting MeadiaPortal directly, you start the batchfile, which is starting the Server, starting on the server the clientxactive process and starting MediaPortal afterwards.
The Server is staying awake till we kill the process clientxactive, which will be done when you close Mediaportal on the client.
Only open problem remains a dedicated MediaPortal client, on which MediaPortal is running permanently and for stopping the computer is send to hibernate only. For this configuration the above procedure does not work. Here we need a smart little program called
Hibernate Trigger: http://www.rpi.edu/~desimn/suspendtrigger/
The wonderful program is executing commands before entering in hibernation (or suspend) and when waking up from hibernation (or suspend).
We create a small batch called afterhibernate.bat:
C:\mpstart\wolcmd [mac address] [ip address] [subnet mask] [port number]
C:\mpstart\psexec \\pc250 -u client -p password -i F:\powerscheduler\clientxactive.bat
And another one called beforehibernate.bat
C:\mpstart\pskill \\pc250 -u client -p password clientxactive.exe"
And these batches we are putting in the adequate places of Hibernate Trigger and it’s done.
Enjoy.
So I was searching for a work-around, and I wanted to share with you what I have installed (and for me it’s running fine).
Idea was to use the possibility of the Powerscheduler which is integrated in the TV Server to check for running processes. This means that every client has to start his own process on the server when he is logging in, and kill this process when he is logging out.
Sample-configuration :
Server: PC250
Client 1: PC001
Client 2: PC002
Client 3: PC003
We need to download two programs (freeware) :
Pstools: http://www.microsoft.com/technet/sysinternals/utilities/pstools.mspx
wolcmd: http://www.depicus.com/download.aspx?product=commandline
Out of the PsTools we need only the programs PsExec and PsKill.
The program wolcmd is for waking up the server from hibernate or suspend.
For each client we create a unique exe file in this directory of the Server. For this we can take any Windows program which can be executed in several instances in parallel, no functionality is needed, we need only processes. A simple one is calc.exe (you can find it in the \system32\ folder), or use this wonderfull attached program (client1active.exe) which I have written during long hours (1 line source-code) which only right to exist is to exist. It’s doing nothing but waiting for being killed (your can “kill” it with any key). For each client you create a new copy:
Client1: Client1active.exe
Client2: Client2active.exe
Client3: Client3active.exe
Etc.
These files you locate in your Powerschedule directory of the Server (let’s say “F:\PowerScheduler”).
Now you have to create a batchfile for each program:
Client1active.bat:
START /min client1active.exe
Client2active.bat:
START /min client2active.exe
Etc.
Having done this we have to integrate these processes in the Powerscheduler as processes which prevent the system to enter in standby. (For this the processes has to be started.)
Finally you have to create a new user on the server. Let’s call him “client” and give him a password (password is needed, because Win XP does not allow remote access without password).
On each Client you create a start directory for MediaPortal on your Clientcomputer :
“C:\MPStart\”
In this directory you copy your program PsExec, PsKill and wolcmd and create a batchfile to start MediaPortal (MPStart.bat):
wolcmd [mac address] [ip address] [subnet mask] [port number]
psexec \\pc250 -u client -p password -i F:\powerscheduler\clientxactive.bat
"C:\Program Files\Team MediaPortal\MediaPortal\MediaPortal.exe"
pskill \\pc250 -u client -p password clientxactive.exe"
pc250 is the name of the server
password is the password of the user “Client” on the server.
the x has to be replaced by the number of the client
the “F:\Powerschedule\” has to be the directory you’ve created above.
That’s all: instead of starting MeadiaPortal directly, you start the batchfile, which is starting the Server, starting on the server the clientxactive process and starting MediaPortal afterwards.
The Server is staying awake till we kill the process clientxactive, which will be done when you close Mediaportal on the client.
Only open problem remains a dedicated MediaPortal client, on which MediaPortal is running permanently and for stopping the computer is send to hibernate only. For this configuration the above procedure does not work. Here we need a smart little program called
Hibernate Trigger: http://www.rpi.edu/~desimn/suspendtrigger/
The wonderful program is executing commands before entering in hibernation (or suspend) and when waking up from hibernation (or suspend).
We create a small batch called afterhibernate.bat:
C:\mpstart\wolcmd [mac address] [ip address] [subnet mask] [port number]
C:\mpstart\psexec \\pc250 -u client -p password -i F:\powerscheduler\clientxactive.bat
And another one called beforehibernate.bat
C:\mpstart\pskill \\pc250 -u client -p password clientxactive.exe"
And these batches we are putting in the adequate places of Hibernate Trigger and it’s done.
Enjoy.