HOW-TO:Make Windows boot directly to XBMC (as a shell)

If you are going to use XBMC for Windows as your primary media center, you probably want your HTPC to boot directly to XBMC with as little distraction as possible. The more your XBMC Media Center functions like an "appliance", the more seamless your home theater experience will be. One of the most effective ways to accomplish this is to replace the default Windows "shell", which is "explorer.exe", with a program that will directly launch XBMC in full-screen. A problem with this approach is that the program that launches the shell doesn't allow you to pass parameters (such as the -fs parameter to make XBMC full-screen). In addition, many people need to load other special software, such as audio mixers, remote control software, or EventGhost.

This guide will help overcome these problems.

Note that XBMC Live may be a better solution for creating a home theater "appliance" and can be tested without modifying your computer.

Using EventGhost Method
The program "EventGhost" is a very powerful way to manage remote controls, auto-starting of programs, and other macros. It supports many common remotes out of the box, such as the Microsoft MCE remote, several X10 remotes, the Sony PS3 Bluetooth remote, the ATI Remote Wonder II, USB-UIRT, and the original Xbox DVD remote.

You can use EventGhost to load the plugin for your favorite remote, load the XBMC EventClient plugin, then load XBMC itself.

Setting up EventGhost
INSTALLING EVENTGHOST
 * 1) Download and install the latest EventGhost Beta.
 * 2) Right-click and disable any plugins in the right-hand pane that you aren't using (Winamp, etc.)
 * 3) Install the plugin for the remote receiver you wish to use
 * 4) * (click "add plugin" and select your Remote from the list of "Remote Receivers")
 * 5) Install the XBMC EventClient plugin
 * 6) * (click "add plugin" and select "XBMC" from the "Program Control" section.

CONFIGURE YOUR REMOTE IN EVENTGHOST
 * 1) Press a key on your remote that you would like to cause an action in XBMC.
 * 2) Drag the event that shows up in the left-hand pane of EventGhost to the XBMC action that you want in the right-hand pane.
 * 3) Repeat for each button that you want to use with XBMC

SET XBMC TO AUTOSTART IN EVENTGHOST
 * 1) Under "AutoStart" click "Add Action"
 * 2) Under "System", click "Start Application"
 * 3) * Filepath to executable should be:
 * 4) ** C:\Program Files\XBMC\XBMC.exe (unless you've changed it)
 * 5) * Command line options are:
 * 6) ** -fs (for full-screen)
 * 7) * Working Directory is:
 * 8) ** C:\Program Files\XBMC


 * Add any other programs you want to start automatically in the same way.

Preparing your Desktop Background (optional)
You may safely ignore this section if you don't care what color your screen is when Windows boots up.

CHANGE YOUR DESKTOP BACKGROUND TO BLACK
 * 1) right-click on your desktop, and click properties.
 * 2) click the "desktop" tab, and set background to "none"
 * 3) click the "appearance" tab, click "advanced", select the item "desktop" and set the color to black.

CHANGE YOUR LOGOFF SCREEN BACKGROUND TO BLACK
 * 1) click "Start -> Run" and type "regedit"
 * 2) Navigate to the following key:
 * 3) * HKEY_USERS\.DEFAULT\Control Panel\Colors
 * 4) In the right pane, double-click "Background"
 * 5) In the Edit String dialog box, type "0 0 0" without the quotes ("0 0 0" is RGB for "Black")
 * 6) Click OK
 * 7) Close Regedit

Set Windows to AutoLogin

 * 1) Click Start -> Run, and type:
 * 2) * control userpasswords2
 * 3) Uncheck the "Users must enter a username and password to use this computer" check box.
 * 4) Click Apply.
 * 5) Enter the user name and password you want to be automatically logged-on, and then click OK.
 * 6) Click OK again and you're all done.
 * Note: This works in Windows XP/Vista/7

Set your "Shell" to EventGhost

 * 1) click "Start -> Run" and type "regedit"
 * 2) Navigate to the following key:
 * 3) * HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
 * 4) right-click on "Shell" and rename to "FakeShell" or something similar (so you can restore it later if you wish to)
 * 5) right-click in the right-hand pane and select New -> String Value
 * 6) name it "Shell"
 * 7) double-click Shell and paste the following value (with quotation marks):
 * 8) * "C:\Program Files\EventGhost\EventGhost.exe"
 * 9) close regedit
 * A shortcut to this step is to use InstantSheller and set the "Application to shell" to "C:\Program Files\EventGhost\EventGhost.exe"
 * Instead of changing the system wide "Shell" value HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon you can simply create a new string value "SHELL" in HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon which will only change the shell for a specific user.

Notes on EventGhost Method
You can now restart your computer; it should appear to immediately run XBMC and nothing else.

If you need to run other programs, close or minimize XBMC and press  to run the task manager. Go to File -> New Task (Run...) and type the name of what you want to run.

ie. cmd for the command prompt

regedit to undo the changes we made earlier

firefox to run firefox

explorer to explore your computer (this won't bring up the start menu and taskbar)

etc..

Using SilentLaunch Method

 * 1) Download SilentLaunch and extract to C:\
 * 2) Create a text-file on C:\ named SilentLaunch.cfg
 * 3) Check the properties of your XBMC link and add the target information. For instance, the default is:
 * 4) * "C:\program files\XBMC\XBMC.exe" -fs -p
 * 5) Add any other programs that you want to autostart to the SilentLaunch.cfg file
 * 6) Start the SilentLaunch.exe and check if XBMC get started. (If not goto the end of the post)
 * 7) Download InstantSheller and set the "Application to shell" as C:\SilentLaunch.exe

Troubleshooting SilentLaunch
If nothing happens or an error occurred ...this will enable verbose output to the screen. Typical error: error 2 is file-not-found, check your path.
 * 1) Start a command prompt: Start -> Run, enter cmd.exe -> OK
 * 2) Type cd \
 * 3) Type C:\SilentLaunch.exe -v

It is important to enclose the xbmc-path in quotation marks (") if it contains spaces. The verbose will tell you more on what went wrong.

SilentLaunch Source Code
The source code & more information about the program can be found here http://lars.werner.no/?p=117

For Windows 7 and optional EventGhost : Using Windows 7 Group Policy Object Editor
This method only works under the following versions of Windows 7: This is because they contain the Group Policy Object Editor and all the other versions don't.
 * Enterprise
 * Professional
 * Ultimate

It works under all versions of Windows Server 2008

1. Setting up your user account to log in automatically
 * 1) Log in as administrator.
 * 2) Open the start menu, and type in the search box: netplwiz .
 * 3) Uncheck Users must enter a user name and password to use this computer and hit Apply.
 * 4) A window will pop up asking for the user name and password of the user account which should log in automatically. Supply all the information and hit OK.

Next time you restart, the account selected in step 1 will log on automatically. Now you can setup this account to use XBMC as shell instead of Explorer:

If you want to use EventGhost then skip step 2.

2. Set XBMC as shell for a specific user account
 * 1) Log in as administrator.
 * 2) Open the start menu, and type in the search box: mmc .
 * 3) Choose File -> Add/Remove Snap-in....
 * 4) Select Group Policy Object Editor and hit Add.
 * 5) In the wizard that pops up, hit Browse..., go to tab Users, select your user account (the one that you set up to log on automatically in step 1) and hit OK.
 * 6) Make sure that the checkbox in the wizard is Unchecked, and hit Finish.
 * 7) Hit OK in the Add/Remove Snap-ins window.
 * 8) In the User Configuration -> Administrative Templates -> System folder, open Custom User Interface.
 * 9) Select Enabled and enter the full path (including XBMC.exe and any switches that you may use) in the Interface file name textbox.
 * 10) Hit OK and reboot your system. It should now log in and start XBMC automatically without showing the start menu and icons first

3.Set EventGhost as shell for all users.

First add XBMC in EventGhost as autostart :


 * 1) Open EventGhost
 * 2) Under "AutoStart" click "Add Action"
 * 3) Under "System", click "Start Application"
 * 4) * Filepath to executable should be:
 * 5) ** C:\Program Files\XBMC\XBMC.exe (unless you've changed it)
 * 6) * Command line options are:
 * 7) ** -fs -p (for full-screen, portable-mode)
 * 8) * Working Directory is:
 * 9) ** C:\Program Files\XBMC
 * Add any other programs you want to start automatically in the same way.

Now set EventGhost as shell for all users.
 * 1) Log in as administrator.
 * 2) Press Windows + R.
 * 3) Enter the following text and then press OK.
 * 4) * gpedit.msc
 * 5) In the Window that pops-up go to : User Configuration -> Administrative Templates -> System.
 * 6) Now open Custom User Interface.
 * 7) Select Enabled and enter the full path to EventGhost in the Interface file name textbox.
 * C:\Program Files\EventGhost\EventGhost.exe
 * 1) Hit OK and reboot your system. It should now log in and start XBMC automatically without showing the start menu and icons first