PDA

View Full Version : HOW-TO make a computer into dedicated XBMC for Windows machine (ongoing project)


Harry Muscle
2008-07-17, 23:55
I thought I'd document my attempts and procedure at turning my laptop into a dedicated XBMC for Windows machine. That means that the machine will do nothing but run XBMC. So the whole point is to customize everything so it runs it as quickly and smoothly as possible. Also since Windows is virus prone I want to reduce virus risks without actually running an anti virus that eats up resources on the machine.

Step one was to get a distribution of Windows that's not full of unneeded stuff. First I looked at Windows PE, then BartPE, but I ruled both out cause Windows PE doesn't support OpenGL, and even though BartPE does, I couldn't get video drivers for my video card to work on it properly. My search next led me to TinyXP, which is a very small distribution of XP created using nLite. The legallity is questionable since TinyXP is distributed as an installation CD with CD Key preentered, however, as long as one has a spare valid XP license and possibly uses a program to change the CD Key that windows runs with, it would become fully legal from what I understand. However, TinyXP still had some stuff that I didn't really need.

I finally came across MicroXP ... fully installed it's about 200MB, the installation CD is only 100MB ... that's tiny. It's based on the same idea as TinyXP and done by the same author, however, it just a way slimmer version of TinyXP. Boots up in seconds (15 seconds on my machine and that includes the BIOS screen, etc.). So I had my XP version of choice. Btw, the latest version of MicroXP that's available is 0.82 by eXperience ... again, make sure you have a spare license for XP and change the serial after you install it (you can't enter a serial during installation) to make things fully legal, etc.

Next step is to install any missing drivers. MicroXP is so tiny it's missing quite a few drivers, but that's the price to pay for speed and small size. You'll need to have a normal XP CD handy cause it doesn't even have the USB Key drivers (it will ask for the Microsoft Windows XP CD to install the drivers when you insert a USB Key). Depending on which drivers you need the process will be different, but the simplest way is to download all the missing drivers on another machine, burn them to CD or place them on a USB Key and then from Device Manager install them manually ... not too difficult.

Obviously the next step is to install XBMC.

Once that's done I changed the Windows shell to no longer be explorer.exe but to point to a batch file that starts XBMC.

My next to do items are:

Figure out some way to shutdown or reboot the machine when XBMC exists (depending wether the user selected Shutdown or Reboot).

And to deal with viruses I have come across some information about how to get EWF (enhanced write filter) to work for Windows XP. What this basically does is not allow anything to be written to your system partition but instead writes it to RAM ... so as soon as you reboot any changes made are gone ... that means though that XBMC will need to be installed to a seperate partiton so it's changes are permanent, but this way you protect the system partition from any virus infection, etc. since you can't write to it ... it only pretends to write to it and as soon as you reboot all the changes are gone.

And somewhere along the way I also need to get my Xbox remote control to work.

I'll try to post more info as I figure more of this stuff out, but in the end I'm hoping to have a machine that boots in seconds, does nothing but run XBMC, and can't easily be infected by a virus.

Thanks,
Harry

zeuss-axis
2008-07-18, 00:28
Figure out some way to shutdown or reboot the machine when XBMC exists (depending wether the user selected Shutdown or Reboot).
...
And somewhere along the way I also need to get my Xbox remote control to work.


I'm in pursuit of something similar, though I'll be sticking with full WinXP Pro and using hibernate rather than shutdown to cut down on boot times.

Both of the quoted items above may be taken care of by the latest version of REMOTEXBMC(1.6), which provides drivers for the remote in Windows, and has button sequences for shutdown, reboot, hibernate, etc.

Currently, I have my Xbox remote dongle hardwired to an internal USB header cable, and mounted inside the case (case has an IR window). My harmony remote is programmed to work as my Xbox remote, which is ideal, given the ability to program macros to a single button.

I haven't been able to get the button sequences to work with REMOTEXBMC yet; I'll post when I figure it out.

Lastly, I'm curious if your .bat file for booting XBMC as shell will allow booting multiple programs? I currently can't implement XBMC as shell because REMOTEXBMC has to boot as a startup task...

Harry Muscle
2008-07-18, 03:22
In order to run multiple programs at once from a batch file you need to start them using the start command ... quite simple once you know it ... so for example if I typed this:

notepad.exe
notepad.exe

in a batch file, it would run the first notepad and only run the second notepad once the first was closed. But if I typed this:

start notepad.exe
start notepad.exe

it will run both of them right away.

Quick side note ... if you are providing the full path in your start command you have to put it in quotes if it has spaces ... also you need to provide a dummy quote section too ... so you'd have to do this:

start "" "C:\Windows\Notepad.exe"

cause

start "C:\Windows\Notepad.exe" won't work.

Hope that helps.

Harry

Bedpan
2008-07-18, 03:31
Keep us (me) abreast of your progress. This is more less what I want to do as well. Just need better hardware for the box. My P4 2.4Ghz with ATI 9800 does not seem to cut it for Hi-Def. Seems ok on my Gaming machine though. Just don't have the coin floating around for new hardware.

WinterMuteAu
2008-07-18, 03:35
Well I'm coming from the other direction. Have a working MCE system that records Free-To-Air Digital TV & Pay TV, both webpage driven and avi convertors running, and putting it in the lounge room with a mce remote.

So it'll record and play fine. :)

TheSovereign
2008-07-18, 03:59
If you'd like to do away with the ugly black command prompt window you'll get from the batch file, you could try creating an AutoIt script. (Which you could even compile to an executable.)

http://www.autoitscript.com/autoit3/

Great scripting language, very powerful, and yet very easy to learn. =)

Gamester17
2008-07-18, 16:46
Anyone who is interested in this should also read these other topic-threads:
http://xbmc.org/forum/showthread.php?t=34756
http://xbmc.org/forum/showthread.php?t=34325

:;):

Harry Muscle
2008-08-05, 17:48
There's gonna be a bit of a delay before I can do more stuff on this project unfortunately cause I will need to get my hands on new hardware for it ... my original plan to use my laptop (which only has VGA output) has been scrapped cause I bought a Mitsubishi HC1500 projector at Best Buy (awesome deal ... $540 plus tax) which has a dreadfull VGA interface. So I'm gonna put together some cheap hardware that has DVI or HDMI output and continue with this project then.

Thanks,
Harry

zeuss-axis
2008-08-05, 20:23
Harry--

The "On Shutdown" features added to XBMC recently pretty much closed this loop; you can set Windows Shell to boot to a .bat file with all the programs you need running, and set a specified remote key to shut down XMBC...what else is there?

Harry Muscle
2008-08-08, 16:43
The biggest thing still left is to make the Windows machine immune to virus attack (since it's running Windows and it's connected to the internet) without actually running an antivirus ... I'm hoping to accomplish that using EWF.

Thanks,
Harry

Clumsy
2008-08-08, 19:01
Can't really see a situation atm where you could catch a virus when you are only using xbmc. A python script could be dangerous, but what else would be any threat as long as the windows firewall is enabled or somr sort of equivalent ? You do have to do something active as a user to catch a virus, most of the time exploits with for example web browsers that execute malicious code. I have been running windows from xp to vista on severals PCs for years without ever having installed an active virus protection. Would I only be using xbmc, beeing behind a hardware router would be sufficient - maybe with the addition of a software firewall/paket filter.

regulator207
2008-08-08, 19:38
check out microsoft steadystate: http://www.microsoft.com/windows/products/winfamily/sharedaccess/default.mspx

I installed it on a bunch of kiosk's for work and eliminates the need for virus scan. just have to reboot and everything is back the way I want.

MrFlanagan
2008-10-01, 20:10
How is this working for you or is it working at all?

I just used Tinyxp rev 09 and xbmc atlantis beta and will not open, it just bombs out after half a second. I may try microxp soon

waldo22
2009-02-17, 18:56
See the new Wiki entry here:

http://xbmc.org/wiki/?title=HOW-TO_make_Windows_boot_directly_to_XBMC_(as_a_shell)

EventGhost starts up minimized, and runs any program (or programs) you need it to.

-Wes

SKiNNiEH
2009-02-17, 23:04
This leads me to think about a 'Windows 2008 Server Core' installation. Which is stripped from anything Gui-like by Microsoft. Make that autostart xbmc and you're done. The only big difference is the size on the harddrive as compared to tinyxp or something.

Kazuka
2009-02-17, 23:34
Skinnieh, that is indeed a great idea. It would be the equivalent of XBMC Live or Ubuntu Server based XBMC.

Not very familiar with the Core setup of Windows 2008, i'm wondering if this can even be achieved. As I understand the Core installation has no GUI, Explorer or something like that. It's all command line and we need to find proper drivers for the video and audio hardware. Since it's based on the Vista kernel, my guess is you can use Vista drivers for a lot of hardware?

But this is something really cool to look into!

SKiNNiEH
2009-02-18, 00:10
This is something i want to try soon! Im confident it should work but id like to compare that with my current xbmc/vista sp1 setup in both startup speed and performance during playback. What would be a good way to benchmark before starting over?

SKiNNiEH
2009-02-19, 23:52
I've done sone initial stuff in VMWare to get familiar with how the Core version of 2008 server works. It is so severely stripped, that 99% goes via the command line or via the registry. When logging on the only thing you see is a dos box and the only way to set the resolution, for example, is by means of the registry.

Setup of xbmc is possible by simply running the installer from the command prompt... next-next-finish as normal. The footprint of the OS is extremely small and i believe it is perfectly capable of running xbmc as long as:

a. ati (in my case) drivers install properly
b. realtek drivers install properly

In VMWare there is no opengl support and i believe xbmc is also asking for a few directx .dll's... i'm unsure if directx is something that can be installed or if only the 2 or 3 .dll's need to be present in c:\windows\system32.

The next step is to set this up on my HTPC and see if i can get it to work 100% with xbmc... not a project for the average user and maybe the gain in performance is not worth the trouble.

If only there was a proper benchmark way so that it can be compared to my current setup!

kizer
2009-02-20, 00:08
Why not just build it like the CarPC guys are doing it with Compact flash cards for boot drives and putting their swap on a seperate hard drive, which in this case would be your movie drive I suppose. Make it a fast and small drive and you could stream all your media across a small network to keep the power use/heat down to a minimum.

IDE to Compact Flash :

These units allow users to replace traditional hard drives with standard Compact Flash cards.

There are some real nice bennefits to using compact flash in place of a regular hard drive.

These include:
- very low power consumption (less then 0.5W)
- Fast startup, no spin up time, or USB bottleneck
- high transfer rate
- phisically very durable
- compatibility with IDE drivers, nothing special needed
- they are completely silent
- The use commodity (cheap and plentiful) CF cards

steford
2009-02-20, 01:29
REMOVED - thread started