Archive:HOW-TO:Make Windows boot directly to Kodi (as a shell): Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Gamester17
(Thanks to Lars Werner)
 
>Waldo22
No edit summary
Line 1: Line 1:
If you going to use XBMC for Windows as your primary media center. Many of you know the Shell-function override does not handle params and therefor limit the startup of XBMC.  
If you 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.


This is a solution to that problem.
The more your XBMC Media Center functions like an "appliance", the more seamless your home theater experience will be.


==Step-by-Step==
One of the most effective was 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.
# Download SilentLaunch extract to C:\
 
A problem with this approach is that the program that launches the shell can not accept 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 drivers, or EventGhost.
 
This guide will help overcome these problems.
 
=Using EventGhost Method=
The program "EventGhost" is a very powerful way to manage remote controls, auto-starting of programs, and other macros.
 
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'''
#Download and install the latest [http://www.eventghost.org/downloads/ EventGhost Beta.]
#Right-click and disable any plugins in the right-hand pane that you aren't using (Winamp, etc.)
#Install the plugin for the remote receiver you wish to use
#*(click "add plugin" and select your Remote from the list of "Remote Receivers")
#Install the XBMC EventClient plugin
#*(click "add plugin" and select "XBMC" from the "Program Control" section.
 
'''CONFIGURE YOUR REMOTE IN EVENTGHOST'''
#Press a key on your remote that you would like to cause an action in XBMC. 
#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.
#Repeat for each button that you want to use with XBMC
 
'''SET XBMC TO AUTOSTART IN EVENTGHOST'''
#Under "AutoStart" click "Add Action"
#Under "System", click "Start Application"
#*Filepath to executable should be:
#**<div style="height: auto; width: 220px; overflow:auto; border: thin inset black; background: #E6E6FA">C:\Program Files\XBMC\XBMC.exe</div> (unless you've changed it)
#*Command line options are:
#**<div style="height: auto; width: 40px; overflow:auto; border: thin inset black; background: #E6E6FA">-fs -p</div> (for full-screen)
#*Working Directory is:
#**<div style="height: auto; width: 150px; overflow:auto; border: thin inset black; background: #E6E6FA">C:\Program Files\XBMC</div>
<br>
==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'''
#right-click on your desktop, and click properties.
#click the "desktop" tab, and set background to "none"
#click the "appearance" tab, click "advanced", select the item "desktop" and set the color to black.
 
'''CHANGE YOUR LOGOFF SCREEN BACKGROUND TO BLACK'''
#click "Start -> Run" and type "regedit"
#Navigate to the following key:
#*<div style="height: auto; width: 300px; overflow:auto; border: thin inset black; background: #E6E6FA">HKEY_USERS\.DEFAULT\Control Panel\Colors</div>
#In the right pane, double-click "Background"
#In the Edit String dialog box, type "0 0 0" without the quotes ("0 0 0" is RGB for "Black)
#Click OK
 
==Set Windows to AutoLogin==
#Click Start -> Run, and type:
#*<div style="height: auto; width: 180px; overflow:auto; border: thin inset black; background: #E6E6FA">control userpasswords2</div>
#Uncheck the "Users must enter a username and password to use this computer" check box.
#Click Apply.
#Enter the user name and password you want to be automatically logged-on, and then click OK.
#Click OK again and you're all done.
*Note: I'm unsure if this works in Vista
 
==Set your "Shell" to EventGhost==
#click "Start -> Run" and type "regedit"
#Navigate to the following key:
#*<div style="height: auto; width: 560px; overflow:auto; border: thin inset black; background: #E6E6FA">HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon</div>
##right-click on "Shell" and rename to "FakeShell" or something similar (so you can restore it later if you wish to)
##right-click in the right-hand pane and select New -> String Value
##name it "Shell"
##double-click Shell and paste the following value (with quotation marks):
##*<div style="height: auto; width: 320px; overflow:auto; border: thin inset black; background: #E6E6FA">"C:\Program Files\EventGhost\EventGhost.exe"</div>
##close regedit
* A shortcut to this step is to use [http://www.gameex.net/download/instantsheller.zip InstantSheller] as described below.
 
==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 XBMC and press ctrl-shift-esc 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<br>
'''regedit''' to undo the changes we made earlier<br>
'''firefox''' to run firefox
etc..
 
=Using SilentLaunch Method (by Lars Werner)=
# Download [http://lars.werner.no/wp-content/uploads/2008/09/silentlaunch.zip SilentLaunch] and extract to C:\
# Create a text-file on C:\ named SilentLaunch.cfg
# Create a text-file on C:\ named SilentLaunch.cfg
# Check the properties of your XBMC link and add the target information. For instance "C:\program files\XBMC\XBMC.exe" -fs -p
# Check the properties of your XBMC link and add the target information. For instance, the default is:
#*<div style="height: auto; width: 260px; overflow:auto; border: thin inset black; background: #E6E6FA">"C:\program files\XBMC\XBMC.exe" -fs -p</div>
# Start the SilentLaunch.exe and check if XBMC get started. (If not goto the end of the post)
# Start the SilentLaunch.exe and check if XBMC get started. (If not goto the end of the post)
# Download InstantSheller set the "Application to shell" as C:\SilentLaunch.exe
# Download [http://www.gameex.net/download/instantsheller.zip InstantSheller] and set the "Application to shell" as C:\SilentLaunch.exe
 
Voila you got the XBMC started without showing anything else!


==Finishing Up==
==Troubleshooting SilentLaunch==
If nothing happens or an error accured
If nothing happens or an error occurred
# Start a commandprompt Start -> Run, enter "cmd.exe" -> OK
# Start a command prompt: Start -> Run, enter <div style="height: auto; width: 65px; overflow:auto; border: thin inset black; background: #E6E6FA">cmd.exe</div> -> OK
# Write "C:\SilentLaunch.exe -v" this will verbose output to the screen
# Type  <div style="height: auto; width: 40px; overflow:auto; border: thin inset black; background: #E6E6FA">cd \</div>
Typical error 2 is file-not-found, check your path.
#Type <div style="height: auto; width: 220px; overflow:auto; border: thin inset black; background: #E6E6FA">C:\SilentLaunch.exe -v</div>
...this will enable verbose output to the screen.
Typical error: error 2 is file-not-found, check your path.


It is pretty important with " at the start and ending of the xbmc-path if it contains spaces and the because the parameters is separated by spaces. The verbose will tell you more on what went wrong.
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.


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


==See Also==
=See Also=
Community Forum discussion threads on the topic:
Community Forum discussion threads on the topic:
* http://forum.xbmc.org/showthread.php?t=37492
* http://forum.xbmc.org/showthread.php?t=37492
* http://forum.xbmc.org/showthread.php?t=34325
* http://forum.xbmc.org/showthread.php?t=34325
* http://forum.xbmc.org/showthread.php?t=34966
* http://forum.xbmc.org/showthread.php?t=34966

Revision as of 02:04, 17 February 2009

If you 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 was 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 can not accept 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 drivers, or EventGhost.

This guide will help overcome these problems.

Using EventGhost Method

The program "EventGhost" is a very powerful way to manage remote controls, auto-starting of programs, and other macros.

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
    • (click "add plugin" and select your Remote from the list of "Remote Receivers")
  4. Install the XBMC EventClient plugin
    • (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"
    • Filepath to executable should be:
      • C:\Program Files\XBMC\XBMC.exe
        (unless you've changed it)
    • Command line options are:
      • -fs -p
        (for full-screen)
    • Working Directory is:
      • C:\Program Files\XBMC


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:
    • HKEY_USERS\.DEFAULT\Control Panel\Colors
  3. In the right pane, double-click "Background"
  4. In the Edit String dialog box, type "0 0 0" without the quotes ("0 0 0" is RGB for "Black)
  5. Click OK

Set Windows to AutoLogin

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

Set your "Shell" to EventGhost

  1. click "Start -> Run" and type "regedit"
  2. Navigate to the following key:
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
    1. right-click on "Shell" and rename to "FakeShell" or something similar (so you can restore it later if you wish to)
    2. right-click in the right-hand pane and select New -> String Value
    3. name it "Shell"
    4. double-click Shell and paste the following value (with quotation marks):
      • "C:\Program Files\EventGhost\EventGhost.exe"
    5. close regedit

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 XBMC and press ctrl-shift-esc 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 etc..

Using SilentLaunch Method (by Lars Werner)

  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:
    • "C:\program files\XBMC\XBMC.exe" -fs -p
  4. Start the SilentLaunch.exe and check if XBMC get started. (If not goto the end of the post)
  5. Download InstantSheller and set the "Application to shell" as C:\SilentLaunch.exe

Troubleshooting SilentLaunch

If nothing happens or an error occurred

  1. Start a command prompt: Start -> Run, enter
    cmd.exe
    -> OK
  2. Type
    cd \
  3. Type
    C:\SilentLaunch.exe -v

...this will enable verbose output to the screen. Typical error: error 2 is file-not-found, check your path.

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

See Also

Community Forum discussion threads on the topic: