Sep 202008

It has been a while since I’ve created anything small and useful for the community. This time the XBMC for Windows is the new “it” for me. The time of HD-movies is here and the HTPC boxes are growing beneath the TV-sets and here is a simple solution for getting the XBMC as a “shell”.

First of all I would like to say thank you to ritchiethebrit at GameEx for his InstantSheller. If the site is down, then download it from me here

The InstantSheller will set your HKEY_CURRENT_USER \Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell from blank (meaning use the default explorer.exe) to something else + it will make you able to customize your boot-loading screen, removing cursors etc. Simple, plain and easy! πŸ™‚

The only problem with replacement of the shell is that parameters cannot be included. Meaning that you need some kind of launcher and that is where the SilentLaunch comes in. It will start a list of programs based its config %homedrive%\SilentLaunch.cfg and here you can include your params and launch order.

Downloade SilentLaunchv2 (exe)
Download SilentLaunchv2 Source code (created with Visual Studio 2010 c++ win32)
Download SilentLaunch
Download SilentLaunch Sourcecode (created with Visual Studio 6.0 c++ win32)

1. Create a blank text-file on you C:\ drive called “SilentLaunch.cfg”
2. Add your applications you want. (Remember to put ” around paths that contains spaces!) add params after that.
3. Test your application by running it with a “-v” argument that will verbose the steps.

Example of SilentLaunch.cfg (one line = one action)

%systemroot%\notepad.exe %systemroot%\win.ini
"c:\program files\someapplication.exe"
"c:\program files\xbmc.exe" -fs -p

This configuration will try to launch 5 applications when SilentLaunch is triggered.

Please note that %systemroot% usally doesn’t have spaces in it variable, but %programfiles% does (eg c:\program files)
If you try to launch anything from that you need quotes (“) around it, eg: “%programfiles%\XBMC\xbmc.exe” -fs -p

Take each variable you have in the config-file and test it in the commandprompt (Start -> Run -> cmd.exe) and check if it starts as it should, the returncodes from the system is equal SilentLaunch

The enviroment variables only work with v2 of SilentLaunch

Setup with InstantSheller
Note: Please test you config before you set it as shell in instantsheller!

Just place the SilentLaunch.exe where ever you like, for instance c:\SilentLaunch.exe. Then run the InstantSheller and make the C:\SilentLaunch.exe as your “Application to shell”.

Help nothing is showing up
You did test the config didn’t you? πŸ™‚

Press CTRL+LSHIFT+ESC to get the taskmanager up, then press File -> Run enter “Explorer.exe” and you’ll get a explorer window to browse.

If you encounter other problems, please use Instantsheller to undo back to default shell (using method above), fix the problem and try again.

Returncodes in verbose mode
00 = “The operating system is out of memory or resources.”.
02 = “The specified file was not found”.
03 = “The specified path was not found.”.
05 = “The operating system denied access to the specified file”.
08 = “There was not enough memory to complete the operation.”.
10 = “Wrong Windows version”.
11 = “The .EXE file is invalid (non-Win32 .EXE or error in .EXE image).”.
12 = “Application was designed for a different operating system”.
13 = “Application was designed for MS-DOS 4.0”.
15 = “Attempt to load a real-mode program”.
16 = “Attempt to load a second instance of an application with non-readonly data segments”.
19 = “Attempt to load a compressed application file”.
20 = “Dynamic-link library (DLL) file failure”.
26 = “A sharing violation occurred.”.
27 = “The filename association is incomplete or invalid.”.
28 = “The DDE transaction could not be completed because the request timed out.”.
29 = “The DDE transaction failed”
30 = “The DDE transaction could not be completed because other DDE transactions were being processed.”.
31 = “There is no application associated with the given filename extension.”.
32 = “The specified dynamic-link library was not found.”.
OTHERWISE = “undocumented”.

Really off topic for programmers only
I encountered an error while compiling this program in release mode. The errors where:

libcp.lib(locale.obj) : error LNK2001: unresolved external symbol ___security_cookie
libcp.lib(wlocale.obj) : error LNK2001: unresolved external symbol ___security_cookie
libcp.lib(xlocale.obj) : error LNK2001: unresolved external symbol ___security_cookie
libcp.lib(locale.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
libcp.lib(wlocale.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
libcp.lib(xlocale.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4

Microsoft had the solution and it can be found here:

Basically you need to add the “bufferoverflowU.lib” library to the release mode to include the “security cookie” variables. This could be useful to others, please let me know πŸ˜‰

Note: The bufferoverflowU.lib function isn’t needed in Visual Studio 2010! πŸ™‚

 Posted by at 16:41:55

  33 Responses to “SilentLaunch a simple Windows Shell replacement for HTPC (Updated 11.06.2011)”

  1. Whats Going down i’m new to this, I stumbled upon this I have found It absolutely useful and it has helped me out loads. I’m hoping to give a contribution & help different users like its aided me. Good job.

  2. hey yea i new about the advancedsettings.xml command line .. however i was having trouble with that not working properly also. thats how i got on to this software .. im not using xbmc as a shell im using rocetdock .. and on rocketdock i only have chrome xbmc and firefox my htpc also has internet browsing (obviously) and what ive done is ive disabled the fullscreen/windowed button on xbmc .. so bacicly ive disabled windowed mode. alt+f4 will exit xbmc and alt+tab will minimise xbmc but not window it .. for all else who would like to know how to do this . i will share… : ok in the keymaps folder of xbmc (C:\documents and settings\USERNAME\Application Data\XBMC\userdata\keymaps) create a file called keymaps.xml then cut and paste this little baby in there

    Notification(DISABLED FUNCTION, Push ALT+TAB For Internet, 3)

    obviously you can change the message to whateva you want and also bind or disable other keys

    now maybe im in the wrong thread but im still stuggling .. this only solves one problem the next is ALT+ENTER still switches to windowed mode .. now this is a windows function not an xbmc.. im handy with regedit .. im using XP .. if anyone can help please email


  3. ok i solved my non launching of application program .. my “program files” folder was hidden so it pays to note that silentlaunch cannot launch hidden programs or programs in hidden folders.. but now my -fs does nothing and xbmc still boots windowed

  4. ok so i run the silentlaunch from Command promt in windows (allready using a alternate shell) with the -v parameter and everything runs perfect except the program doesnt launch examplebelow.. folders and filenames are correct

    C:\>silentlaunchv2 -v

    Reading config..
    Application: “C:\Program Files\XBMC\xbmc.exe” -fs -p
    Finish reading config..

    Starting to launch applications
    Launch: “C:\Program Files\XBMC\xbmc.exe”
    Param: -fs -p
    Res: OK
    Finished to launch applications

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: