- May 2, 2011
- 33
- 61
- Home Country
- United States of America
The pc I use to serve MediaPortal is dual-purpose; ie, normal pc operations (net, gaming, encoding, etc) and as a HTPC (serving MediaPortal). There are times when I do not want MP to have x amount of memory and resources allocated to it; ie, when gaming, encoding heavy projects, etc. Before, I would have to go into Administrative Tools|Services and disable MySQL and TVService services and stop them or simply stop them, depending on whether I was planning on rebooting or not. Instead, I created a simple batch file to turn them both off/on and created a shortcut in my start menu to click on to make the action happen. I also created the same but for turning them both back on, in case I needed them running later for a recording session. Yes, opening MP will also start the two services (if in manual or auto service mode) but I wanted to not have to start MP, which I have set to open full-screen and always on my TV; ie, would have to start MP, turn on TV, close MP, turn off TV).
This is how I have things configured. Note that I leave MySQL and TVService in manual startup mode in Windows Services but you can also use this if running both services in automatic start mode.
STOP SERVICES
Copy the following into notepad...
Either create a folder on your system drive (normally C called "whatever" or scripts or tools, etc. and save what you just did in Notepad as "stoptv". When saving, be sure to select ALL FILES and not save it as a .txt file, and include the extension .bat at the end of the filename so it reads "stoptv.bat".
Create a shortcut in your start menu program, on your desktop, or in any folder on your system, pin it to the left side of the start menu, put it in your taskbar, etc. Remember that you will need to include a custom path if you do not use a folder called "Tools" on your C: drive and do not name the file "stoptv.bat".
START SERVICES
That's it. Alot of talking to do something so easy. Again, a reminder, if you do set your MySQL & TVService to manual and do turn them off, if you have something scheduled to record later that day or night, do not forget to start them again.
Hope this helps out other dual-purpose pc owners.
This is how I have things configured. Note that I leave MySQL and TVService in manual startup mode in Windows Services but you can also use this if running both services in automatic start mode.
STOP SERVICES
Copy the following into notepad...
Code:
net stop TVService
net stop MySQL
exit
Create a shortcut in your start menu program, on your desktop, or in any folder on your system, pin it to the left side of the start menu, put it in your taskbar, etc. Remember that you will need to include a custom path if you do not use a folder called "Tools" on your C: drive and do not name the file "stoptv.bat".
Code:
%systemroot%\system32\cmd.exe /k c:\Tools\stoptv.bat
START SERVICES
Code:
net start MySQL
net start TVService
exit
Code:
%systemroot%\system32\cmd.exe /k c:\Tools\starttv.bat
That's it. Alot of talking to do something so easy. Again, a reminder, if you do set your MySQL & TVService to manual and do turn them off, if you have something scheduled to record later that day or night, do not forget to start them again.
Hope this helps out other dual-purpose pc owners.